OSDN Git Service
Chandler Carruth [Sat, 5 Aug 2017 07:37:00 +0000 (07:37 +0000)]
[LCG] Completely remove the parent set and leaf tracking for RefSCCs.
After the previous series of patches, this is now trivial and deletes
a pretty astonishing amount of complexity. This has been a long time
coming, as the move toward a PO sequence of RefSCCs started eroding the
underlying use cases for this half of the data structure.
Among the biggest advantages here is that now there aren't two
independent data structures that need to stay in sync.
Some of my profiling has also indicated that updating the parent sets
was among the most expensive parts of the lazy call graph. Eliminating
it whole sale is likely to be a nice win in terms of compile time.
Last but not least, I had discussed with some folks previously keeping
it around for asserts and other correctness checking, but once the
fundamentals of the parent and child checking were implemented without
the parent sets their value in correctness checking was tiny and no
where near worth the cost of the complexity required to keep everything
up-to-date.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310171
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 06:24:09 +0000 (06:24 +0000)]
[LCG] Re-implement the basic isParentOf, isAncestorOf, isChildOf, and
isDescendantOf methods on RefSCCs in terms of the forward edges rather
than the parent sets.
This is technically slower, but probably not interestingly slower, and
all of these routines were already so expensive that they're guarded
behind both !NDEBUG and EXPENSIVE_CHECKS.
This removes another non-critical usage of parent sets.
I've also added some comments to try and help clarify to any potential
users the costs of these routines. They're mostly useful for debugging,
asserts, or other queries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310170
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 05:47:37 +0000 (05:47 +0000)]
[LCG] Add the concept of a "dead" node and use it to avoid a complex
walk over the parent set.
When removing a single function from the call graph, we previously would
walk the entire RefSCC's parent set and then walk every outgoing edge
just to find the ones to remove. In addition to this being quite high
complexity in theory, it is also the last fundamental use of the parent
sets.
With this change, when we remove a function we transform the node
containing it to be recognizably "dead" and then teach the edge
iterators to recognize edges to such nodes and skip them the same way
they skip null edges.
We can't move fully to using "dead" nodes -- when disconnecting two live
nodes we need to null out the edge. But the complexity this adds to the
edge sequence isn't too bad and the simplification of lazily handling
this seems like a significant win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310169
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Sat, 5 Aug 2017 04:30:55 +0000 (04:30 +0000)]
[AArch64] LSE Atomics reorg - part 1
Add memory synchronization semantics to LSE Atomics.
The memory semantics feature will be added in a subsequent patch.
In this patch, several corrections were added to the existing LSE Atomics
implementation, based on the ARM Errata D11904 from 05/12/2017.
Patch by: steleman
Differential Revision: https://reviews.llvm.org/D35319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310167
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 04:04:06 +0000 (04:04 +0000)]
[LCG] Replace an implicit bool operator with a named function. (NFC)
The definition of 'false' here was already pretty vague and debatable,
and I'm about to add another potential 'false' that would actually make
much more sense in a bool operator. Especially given how rarely this is
used, a nicely named method seems better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310165
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 03:37:39 +0000 (03:37 +0000)]
[LCG] When removing a dead function and clearing out the data
structures, actually null out the graph pointers as well. We won't ever
update these, and we certainly shouldn't be calling any methods on them,
so it seems good to defensively nuke them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310164
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 03:37:39 +0000 (03:37 +0000)]
[LCG] Rather than walking the directed graph structure to update graph
pointers in node objects, just walk the map from function to node.
It doesn't have stable ordering, but works just as well and is much
simpler. We don't need ordering when just updating internal pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 03:37:38 +0000 (03:37 +0000)]
[LCG] Remove the complex walk of the parent sets to update graph
pointers.
This is completely unnecessary as we have a trivial list of RefSCCs now
that we can walk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310162
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 5 Aug 2017 03:37:37 +0000 (03:37 +0000)]
[LCG] Remove the use of the parent sets to compute connectivity when
merging RefSCCs.
The logic to directly use the reference edges is simpler and not
substantially slower (despite the comments to the contrary) because this
is not actually an especially hot part of LCG in practice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310161
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 5 Aug 2017 01:45:17 +0000 (01:45 +0000)]
[InstCombine] In foldSelectICmpAnd, if we need to to truncate from the 'and' type to the 'select' type, do it after shifting right instead of just bailing.
Previously we were always trying to emit the zext or truncate before any shift. This meant if the 'and' mask was larger than the size of the truncate we would skip the transformation.
Now we shift the result of the and right first leaving the bit within the range of the truncate.
This matches what we are doing in foldSelectICmpAndOr for the same problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310159
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 5 Aug 2017 00:15:40 +0000 (00:15 +0000)]
Commit the local change I had to make my test pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310153
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 5 Aug 2017 00:10:43 +0000 (00:10 +0000)]
[X86] Teach fastisel to select calls to dllimport functions
Summary:
Direct calls to dllimport functions are very common Windows. We should
add them to the -O0 fast path.
Reviewers: rafael
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D36197
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310152
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 23:49:53 +0000 (23:49 +0000)]
[libFuzzer] use the in-binary pc table (instead of PCs captured at run-time) to implement -exit_on_src_pos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310151
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 23:36:03 +0000 (23:36 +0000)]
[X86] Regenerate the fsin/fcos instruction test using update_llc_test_checks.py. NFC
This looks to have been converted from a grep based test at some point in a really strange way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310150
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 4 Aug 2017 23:18:18 +0000 (23:18 +0000)]
[llvm][llvm-objcopy] When outputting to binary don't output segments that cover no sections
Sometimes LLD will produce a PT_LOAD segment that only covers the
headers (and covers no sections). GNU objcopy does not output the
segment contents for these sections. In particular this is an issue in
building magenta because the final link step for the kernel would
produce just such a PT_LOAD segment. This change is to support this case
and to match what GNU objcopy does in this case.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D36196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310149
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 23:13:58 +0000 (23:13 +0000)]
[libFuzzer] print PCs using the in-binary PC-table instead of relying on PCs captured at run-time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310148
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Fri, 4 Aug 2017 22:37:58 +0000 (22:37 +0000)]
Enable llvm-pdbutil to list enumerations using native PDB reader
This extends the native reader to enable llvm-pdbutil to list the enums in a
PDB and it includes a simple test. It does not yet list the values in the
enumerations, which requires an actual implementation of
NativeEnumSymbol::FindChildren.
To exercise this code, use a command like:
llvm-pdbutil pretty -native -enums foo.pdb
Differential Revision: https://reviews.llvm.org/D35738
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310144
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Aug 2017 22:30:34 +0000 (22:30 +0000)]
[InstCombine] narrow truncated add/sub/mul with constant
Name: narrow_sub
%sub = sub i32 C1, %x
%r = trunc i32 %sub to i8
=>
%xn = trunc i32 %x to i8
%narrowC = trunc i32 C1 to i8
%r = sub i8 %narrowC, %xn
Name: narrow_add
%add = add i32 %x, C1
%r = trunc i32 %add to i8
=>
%xn = trunc i32 %x to i8
%narrowC = trunc i32 C1 to i8
%r = add i8 %xn, %narrowC
Name: narrow_mul
%mul = mul i32 %x, C1
%r = trunc i32 %mul to i8
=>
%xn = trunc i32 %x to i8
%narrowC = trunc i32 C1 to i8
%r = mul i8 %xn, %narrowC
http://rise4fun.com/Alive/QpS
This doesn't solve PR34046 (failure to recognize rotate):
https://bugs.llvm.org/show_bug.cgi?id=34046
...but it reduces an extra complication in the description examples
to a form that we can more easily match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310141
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 4 Aug 2017 21:52:00 +0000 (21:52 +0000)]
[Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
Summary:
Tools like clang that use RemoveFileOnSignal on their output files
weren't actually able to clean up their outputs before this change. Now
the call to llvm::sys::fs::remove succeeds and the temporary file is
deleted. This is a stop-gap to fix clang before implementing the
solution outlined in PR34070.
Reviewers: davide
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D36337
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310137
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 4 Aug 2017 21:15:12 +0000 (21:15 +0000)]
Fix broken PDB tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310130
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Fri, 4 Aug 2017 21:13:41 +0000 (21:13 +0000)]
BlockPlacement: add a flag to force cold block outlining w/o a profile.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310129
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 4 Aug 2017 21:10:04 +0000 (21:10 +0000)]
[pdbutil] When dumping section contribs, show the section name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310128
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 4 Aug 2017 21:09:26 +0000 (21:09 +0000)]
Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310127
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 20:47:22 +0000 (20:47 +0000)]
[libFuzzer] re-enable fuzzer-printcovpcs.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310126
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 4 Aug 2017 20:41:37 +0000 (20:41 +0000)]
Remove unused include directive and un-break the module build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310124
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 4 Aug 2017 20:40:38 +0000 (20:40 +0000)]
Revert r310055, it caused PR34074.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310123
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Aug 2017 20:38:33 +0000 (20:38 +0000)]
[InstCombine] add vector tests for truncated math; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310122
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 4 Aug 2017 20:24:13 +0000 (20:24 +0000)]
Revert r310058, it caused PR34073.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310118
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Fri, 4 Aug 2017 20:19:46 +0000 (20:19 +0000)]
[SCEV] Preserve NSW information for sext(subtract).
Pushes the sext onto the operands of a Sub if NSW is present.
Also adds support for propagating the nowrap flags of the
llvm.ssub.with.overflow intrinsic during analysis.
Differential Revision: https://reviews.llvm.org/D35256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310117
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 4 Aug 2017 20:15:46 +0000 (20:15 +0000)]
[GlobalISel] Remove the GISelAccessor API.
Its sole purpose was to avoid spreading around ifdefs related to
building global-isel. Since r309990, GlobalISel is not optional anymore,
thus, we can get rid of this mechanism all together.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310115
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 4 Aug 2017 20:15:41 +0000 (20:15 +0000)]
[GlobalISel] Remove a stall comment in CMake.
Thanks to Diana Picus <diana.picus@linaro.org> for noticing.
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310114
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 20:09:15 +0000 (20:09 +0000)]
[libFuzzer] make a test more robust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310113
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 20:05:25 +0000 (20:05 +0000)]
[libFuzzer] remove the now redundant 'LLVMFuzzer-' prefix from libFuzzer tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310110
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 4 Aug 2017 20:02:38 +0000 (20:02 +0000)]
[llvm-pdbutil] Dump image section headers.
Image section headers are stored in the DBI stream, but we
had no way to dump them. This patch adds dumping support,
along with some tests that LLD actually dumps them correctly.
Differential Revision: https://reviews.llvm.org/D36332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310107
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 20:01:04 +0000 (20:01 +0000)]
[libFuzzer] split one test into several
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310106
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Aug 2017 19:29:32 +0000 (19:29 +0000)]
[InstCombine] auto-generate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310101
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Fri, 4 Aug 2017 19:29:16 +0000 (19:29 +0000)]
[libFuzzer tests] Only enable libFuzzer tests if
-DLIBFUZZER_ENABLE_TESTS=ON is set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310100
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 4 Aug 2017 18:57:58 +0000 (18:57 +0000)]
[SystemZ] Add support for 128-bit atomic load/store/cmpxchg
This adds support for the main 128-bit atomic operations,
using the SystemZ instructions LPQ, STPQ, and CDSG.
Generating these instructions is a bit more complex than usual
since the i128 type is not legal for the back-end. Therefore,
we have to hook the LowerOperationWrapper and ReplaceNodeResults
TargetLowering callbacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310094
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Fri, 4 Aug 2017 18:53:35 +0000 (18:53 +0000)]
[SystemZ] Eliminate unnecessary serialization operations
We currently emit a serialization operation (bcr 14, 0) before every
atomic load and after every atomic store. This is overly conservative.
The SystemZ architecture actually does not require any serialization
for atomic loads, and a serialization after an atomic store only if
we need to enforce sequential consistency. This is what other compilers
for the platform implement as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310093
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Stupachenko [Fri, 4 Aug 2017 18:46:13 +0000 (18:46 +0000)]
Fix PR33514
Summary:
The bug was uncovered after fix of PR23384 (part 3 of 3).
The patch restricts pointer multiplication in SCEV computaion for ICmpZero.
Reviewers: qcolombet
Differential Revision: http://reviews.llvm.org/D36170
From: Evgeny Stupachenko <evstupac@gmail.com>
<evgeny.v.stupachenko@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310092
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 4 Aug 2017 18:43:39 +0000 (18:43 +0000)]
[libFuzzer] make trace-pc.test more reliable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310091
91177308-0d34-0410-b5e6-
96231b3b80d8
Connor Abbott [Fri, 4 Aug 2017 18:36:54 +0000 (18:36 +0000)]
[AMDGPU] Implement llvm.amdgcn.set.inactive intrinsic
Summary:
This intrinsic lets us set inactive lanes to an identity value when
implementing wavefront reductions. In combination with Whole Wavefront
Mode, it lets inactive lanes be skipped over as required by GLSL/Vulkan.
Lowering the intrinsic needs to happen post-RA so that RA knows that the
destination isn't completely overwritten due to the EXEC shenanigans, so
we need another pseudo-instruction to represent the un-lowered
intrinsic.
Reviewers: tstellar, arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
Differential Revision: https://reviews.llvm.org/D34719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310088
91177308-0d34-0410-b5e6-
96231b3b80d8
Connor Abbott [Fri, 4 Aug 2017 18:36:52 +0000 (18:36 +0000)]
[AMDGPU] Add support for Whole Wavefront Mode
Summary:
Whole Wavefront Wode (WWM) is similar to WQM, except that all of the
lanes are always enabled, regardless of control flow. This is required
for implementing wavefront reductions in non-uniform control flow, where
we need to use the inactive lanes to propagate intermediate results, so
they need to be enabled. We need to propagate WWM to uses (unless
they're explicitly marked as exact) so that they also propagate
intermediate results correctly. We do the analysis and exec mask munging
during the WQM pass, since there are interactions with WQM for things
that require both WQM and WWM. For simplicity, WWM is entirely
block-local -- blocks are never WWM on entry or exit of a block, and WWM
is not propagated to the block level. This means that computations
involving WWM cannot involve control flow, but we only ever plan to use
WWM for a few limited purposes (none of which involve control flow)
anyways.
Shaders can ask for WWM using the @llvm.amdgcn.wwm intrinsic. There
isn't yet a way to turn WWM off -- that will be added in a future
change.
Finally, it turns out that turning on inactive lanes causes a number of
problems with register allocation. While the best long-term solution
seems like teaching LLVM's register allocator about predication, for now
we need to add some hacks to prevent ourselves from getting into trouble
due to constraints that aren't currently expressed in LLVM. For the gory
details, see the comments at the top of SIFixWWMLiveness.cpp.
Reviewers: arsenm, nhaehnle, tpr
Subscribers: kzhuravl, wdng, mgorny, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D35524
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310087
91177308-0d34-0410-b5e6-
96231b3b80d8
Connor Abbott [Fri, 4 Aug 2017 18:36:50 +0000 (18:36 +0000)]
[AMDGPU] refactor WQM pass in preparation for WWM (NFCI)
Summary:
Right now, the WQM pass conflates two different things when tracking the
Needs of an instruction:
1. Needs can be StateWQM, which is propagated to other instructions, and
means that this instruction (and everything it depends on) must be
calculated in WQM.
2. Needs can be StateExact, which is not propagated to other
instructions, and means that this instruction must not be calculated in
WQM and WQM-ness must not be propagated past this instruction.
This works now because there are only two different states, but in the
future we want to be able to express things like "calculate this in WQM,
but please disable WWM and don't propagate it" (to implement
@llvm.amdgcn.set.inactive). In order to do this, we need to split the
per-instruction Needs field in two: a new Needs field, which can only
contain StateWQM (and in the future, StateWWM) and is propagated to
sources, and a Disables field, which can also contain just StateWQM or
nothing for now.
We keep the per-block tracking the same for now, by translating
Needs/Disables to the old representation with only StateWQM or
StateExact. The other place that needs special handling is when we
emit the state transitions. We could just translate back to the old
representation there as well, which we almost do, but instead of 0 as a
placeholder value for "any state," we explicitly or together all the
states an instruction is allowed to be in. This lets us refactor the
code in preparation for WWM, where we'll need to be able to handle
things like "this instruction must be in Exact or WQM, but not WWM."
Reviewers: arsenm, nhaehnle, tpr
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D35523
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310086
91177308-0d34-0410-b5e6-
96231b3b80d8
Connor Abbott [Fri, 4 Aug 2017 18:36:49 +0000 (18:36 +0000)]
[AMDGPU] Add an llvm.amdgcn.wqm intrinsic for WQM
Summary:
Previously, we assumed that certain types of instructions needed WQM in
pixel shaders, particularly DS instructions and image sampling
instructions. This was ok because with OpenGL, the assumption was
correct. But we want to start using DPP instructions for derivatives as
well as other things, so the assumption that we can infer whether to use
WQM based on the instruction won't continue to hold. This intrinsic lets
frontends like Mesa indicate what things need WQM based on their
knowledge of the API, rather than second-guessing them in the backend.
We need to keep around the old method of enabling WQM, but eventually we
should remove it once Mesa catches up. For now, this will let us use DPP
instructions for computing derivatives correctly.
Reviewers: arsenm, tpr, nhaehnle
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D35167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310085
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcello Maggioni [Fri, 4 Aug 2017 18:24:09 +0000 (18:24 +0000)]
[MachineOperand] Add ChangeToTargetIndex method. NFC
Differential Revision: https://reviews.llvm.org/D36301
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310083
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 4 Aug 2017 17:43:49 +0000 (17:43 +0000)]
[Support] Remove getPathFromOpenFD, it was unused
Summary:
It was added to support clang warnings about includes with case
mismatches, but it ended up not being necessary.
Reviewers: twoh, rafael
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D36328
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310078
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Fri, 4 Aug 2017 17:43:29 +0000 (17:43 +0000)]
Fixing buildbots: do not register check-fuzzer if clang or asan are not
present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310077
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Fri, 4 Aug 2017 17:43:28 +0000 (17:43 +0000)]
Drop Windows support from libFuzzer tests.
Differential Revision: https://reviews.llvm.org/D36205
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310076
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Fri, 4 Aug 2017 17:19:45 +0000 (17:19 +0000)]
Port libFuzzer tests to LIT. Do not require two-stage build for check-fuzzer.
This revision ports all libFuzzer tests apart from the unittest to LIT.
The advantages of doing so include:
- Tests being self-contained
- Much easier debugging of a single test
- No need for using a two-stage compilation
The unit-test is still compiled using CMake, but it does not need a
freshly built compiler.
NOTE: The previous two-stage bot configuration will NOT work, as in the
second stage build LLVM_USE_SANITIZER is set, which disables ASAN from
being built.
Thus bots will be reconfigured in the next few commits.
Differential Revision: https://reviews.llvm.org/D36295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310075
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 4 Aug 2017 17:15:17 +0000 (17:15 +0000)]
[Inliner] Fix a typo in option description. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310073
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Fri, 4 Aug 2017 17:10:11 +0000 (17:10 +0000)]
[ARM] Use searchable-table for banked registers
This is a continuation of https://reviews.llvm.org/D36219
This patch uses reverse mapping (encoding->name) in
ARMInstPrinter::printBankedRegOperand to get rid of
hard-coded values (as pointed out by @olista01).
Reviewed by: @fhahn, @rovka, @olista01
Differential Revision: https://reviews.llvm.org/D36260
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310072
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 4 Aug 2017 17:09:11 +0000 (17:09 +0000)]
[ArgPromotion] Preserve alignment of byval argument in new alloca
The frontend may have requested a higher alignment for any reason, and
downstream optimizations may already have taken advantage of it. We
should keep the same alignment when moving the allocation from the
parameter area to the local variable area.
Fixes PR34038
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310071
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 16:59:29 +0000 (16:59 +0000)]
[ConstantInt] Use ConstantInt::getValue instead of Constant::getUniqueInteger in a few places where we obviously have a ConstantInt. NFC
getUniqueInteger will ultimately call ConstantInt::getValue, but calling ConstantInt::getValue should be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 4 Aug 2017 16:44:06 +0000 (16:44 +0000)]
[AArch64] Fix an assertion for pre-index generation with unscaled loads/stores.
Differential Revision: https://reviews.llvm.org/D36248
PR34035
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310066
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Fri, 4 Aug 2017 16:20:54 +0000 (16:20 +0000)]
Adjust the hotness threshold from 99.9% to 99%.
Summary: We originally set the hotness threshold as 99.9% to be consistent with gcc FDO. But because the inline heuristic is different between 2 compilers: llvm uses bottom-up algorithm while gcc uses priority based. The LLVM algorithm tends to inline too much early that prevents hot callsites from further inlined into its caller. Due to this restriction, we think it is reasonable to lower the hotness threshold to give priority to those that are really hot. Our experiments show that this change would improve performance on large applications. Note that the inline heuristic has great room for further tuning. Once the inline heuristics are refined, we could adjust this threshold to allow inlining for less hot callsites.
Reviewers: davidxl, tejohnson, eraman
Reviewed By: tejohnson
Subscribers: sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D36317
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310065
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 4 Aug 2017 16:08:41 +0000 (16:08 +0000)]
[InstCombine] Fold single-use variable into assert.
Avoids unused variable warnings in Release builds. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310064
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 16:07:20 +0000 (16:07 +0000)]
[InstCombine] Remove the (not (sext)) case from foldBoolSextMaskToSelect and inline the remaining code to match visitOr
Summary:
The (not (sext)) case is really (xor (sext), -1) which should have been simplified to (sext (xor, 1)) before we got here. So we shouldn't need to handle it.
With that taken care of we only need to two cases so don't need the swap anymore. This makes us in sync with the equivalent code in visitOr so inline this to match.
Reviewers: spatel, eli.friedman, majnemer
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310063
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 16:07:18 +0000 (16:07 +0000)]
[InstCombine] Use ConstantInt::getFalse to reduce some code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310062
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Saternos [Fri, 4 Aug 2017 16:00:58 +0000 (16:00 +0000)]
[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propagate function attributes across modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310061
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 4 Aug 2017 15:42:47 +0000 (15:42 +0000)]
[InstCombine] narrow lshr with constant
Name: narrow_shift
Pre: C1 < 8
%zx = zext i8 %x to i32
%l = lshr i32 %zx, C1
=>
%narrowC = trunc i32 C1 to i8
%ns = lshr i8 %x, %narrowC
%l = zext i8 %ns to i32
http://rise4fun.com/Alive/jIV
This isn't directly applicable to PR34046 as written, but we
need to have more narrowing folds like this to be sure that
rotate patterns are recognized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310060
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Fri, 4 Aug 2017 13:55:24 +0000 (13:55 +0000)]
[AMDGPU][MC] Enabled expressions as operands
See bug 33579: https://bugs.llvm.org//show_bug.cgi?id=33579
Reviewers: vpykhtin, SamWot, arsenm
Differential Revision: https://reviews.llvm.org/D36091
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310059
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 4 Aug 2017 12:46:35 +0000 (12:46 +0000)]
[DAGCombiner] Extending pattern detection for vector shuffle.
If all the operands of a BUILD_VECTOR extract elements from same vector then split the vector efficiently based on the maximum vector access index.
Committed on behalf of @jbhateja (Jatin Bhateja)
Differential Revision: https://reviews.llvm.org/D35788
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310058
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Fri, 4 Aug 2017 12:28:36 +0000 (12:28 +0000)]
[DSE] Merge stores when the later store only writes to memory locations the early store also wrote to.
Summary:
This fixes PR31777.
If both stores' values are ConstantInt, we merge the two stores
(shifting the smaller store appropriately) and replace the earlier (and
larger) store with an updated constant.
In the future we should also support vectors of integers. And maybe
float/double if we can.
Reviewers: hfinkel, junbuml, jfb, RKSimon, bkramer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30703
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310055
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolai Bozhenov [Fri, 4 Aug 2017 12:22:17 +0000 (12:22 +0000)]
[InstCombine] Canonicalize clamp of float types to minmax in fast mode.
Summary:
This commit allows matchSelectPattern to recognize clamp of float
arguments in the presence of FMF the same way as already done for
integers.
This case is a little different though. With integers, given the
min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX
"automatically". That is not the case for float, because for them only
full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care
about NaNs. On the other hand, some backends (e.g. X86) have only
FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM
nodes are illegal thus selection is not happening. So I decided to do
such kind of transformation in IR (InstCombiner) instead of
complicating the logic in the backend.
Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper
Reviewed By: efriedma
Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits
Patch by Andrei Elovikov <andrei.elovikov@intel.com>
Differential Revision: https://reviews.llvm.org/D33186
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310054
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolai Bozhenov [Fri, 4 Aug 2017 12:21:03 +0000 (12:21 +0000)]
Add some tests for cast+clamp/min/max before D33186.
Summary:
- add more tests
- pr27236.ll: rename %tmpN -> %N because otherwise a FileCheck
variable for newly appeared unnamed value would use the same name as
tmpN (as generated by update_test_checks.py)
- run update_test_checks.py
Reviewers: efriedma
Reviewed By: efriedma
Subscribers: n.bozhenov, llvm-commits
Patch by Andrei Elovikov <andrei.elovikov@intel.com>
Differential Revision: https://reviews.llvm.org/D35002
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310053
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Gross [Fri, 4 Aug 2017 10:53:07 +0000 (10:53 +0000)]
[AMDGPU] Fixed MSVC build break
Error was:
field of type 'llvm::ArgDescriptor' has private default constructor
const AMDGPUFunctionArgInfo AMDGPUArgumentUsageInfo::ExternFunctionInfo{};
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310048
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Fri, 4 Aug 2017 10:18:44 +0000 (10:18 +0000)]
[mips][microMIPS] Extending size reduction pass with ADDIUSP and ADDIUR1SP
Author: milena.vujosevic.janicic
The patch extends size reduction pass for MicroMIPS.
The following instructions are examined and transformed, if possible:
ADDIU instruction is transformed into 16-bit instruction ADDIUSP
ADDIU instruction is transformed into 16-bit instruction ADDIUR1SP
Usage of u_int64_t replaced by uint64_t to avoid issues because of which previous patch version was reverted:
Differential Revision: https://reviews.llvm.org/D34511
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310044
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Pfaffe [Fri, 4 Aug 2017 09:28:09 +0000 (09:28 +0000)]
[Polly][PM] Register polly passes with the opt tool for the new-pm path
Summary: When polly is linked into the tools because of the LLVM_POLLY_LINK_INTO_TOOLS option being set, we need to register its passes with the PassBuilder. Because polly is linked in, we can directly call its callback registration method, which registers the appropriate callbacks with the new PM's PassBuilder. This essentially follows exactly the way it worked with the legacy PM.
Reviewers: grosser, chandlerc, bollu
Reviewed By: grosser
Subscribers: pollydev, llvm-commits
Differential Revision: https://reviews.llvm.org/D36273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310043
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 4 Aug 2017 07:41:24 +0000 (07:41 +0000)]
Do not declare a variable which is used only in assert. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310034
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 4 Aug 2017 07:01:04 +0000 (07:01 +0000)]
[IRCE] Handle loops with step different from 1/-1
This patch generalizes IRCE to handle IV steps that are not equal to 1 or -1.
Differential Revision: https://reviews.llvm.org/D35539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310032
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Fri, 4 Aug 2017 06:58:42 +0000 (06:58 +0000)]
[AMDGPU] Preserve inverted bit in SI_IF in presence of SI_KILL
In case if SI_KILL is in between of the SI_IF and SI_END_CF we need
to preserve the bits actually flipped by if rather then restoring
the original mask.
Differential Revision: https://reviews.llvm.org/D36299
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310031
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 4 Aug 2017 06:03:51 +0000 (06:03 +0000)]
Avoid comparison between signed and unsigned in SCEVExitLimitForget tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310029
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 4 Aug 2017 05:48:20 +0000 (05:48 +0000)]
[AVR] Update target machine to use new constructor parameters
The required parameters were changed in r309911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310028
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 4 Aug 2017 05:40:20 +0000 (05:40 +0000)]
[IRCE] Recognize loops with unsigned latch conditions
This patch enables recognition of loops with ult/ugt latch conditions.
Differential Revision: https://reviews.llvm.org/D35302
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310027
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 4 Aug 2017 05:33:44 +0000 (05:33 +0000)]
Revert "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"
This breaks the build on clang-s390x-linux.
This reverts commit r310018.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310026
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 05:12:37 +0000 (05:12 +0000)]
[InstCombine] Move the call to foldSelectICmpAnd into foldSelectInstWithICmp. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310025
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 4 Aug 2017 05:12:35 +0000 (05:12 +0000)]
[InstCombine] Remove unnecessary casts. NFC
We're calling an overload of getOpcode that already returns Instruction::CastOps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310024
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 4 Aug 2017 05:06:44 +0000 (05:06 +0000)]
Fix SCEVExitLimitForget tests to make Sanitizer happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310023
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 4 Aug 2017 05:05:29 +0000 (05:05 +0000)]
Prevent unused warning in non-assert builds (introduced in r310014).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310022
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Fri, 4 Aug 2017 04:51:15 +0000 (04:51 +0000)]
Un-revert r310014: false revert, it wasn't the cause of build break
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310021
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Fri, 4 Aug 2017 04:43:54 +0000 (04:43 +0000)]
Revert r310014 as it breaks build lld-x86_64-darwin13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310020
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 4 Aug 2017 03:17:37 +0000 (03:17 +0000)]
Reland "[llvm][llvm-objcopy] Added support for outputting to binary in llvm-objcopy"
This change adds the "-O binary" flag which directs llvm-objcopy to
output the object file to the same format as GNU objcopy does when given
the flag "-O binary". This was done by splitting the Object class into
two subclasses ObjectELF and ObjectBianry which each output a different
format but relay on the same code to read in the Object in Object.
Patch by Jake Ehrlich
Differential Revision: https://reviews.llvm.org/D34480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310018
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 4 Aug 2017 01:39:23 +0000 (01:39 +0000)]
[Support] Update comments about stdout, raw_fd_ostream, and outs()
The full story is in the comments:
// Do not attempt to close stdout or stderr. We used to try to maintain the
// property that tools that support writing file to stdout should not also
// write informational output to stdout, but in practice we were never able to
// maintain this invariant. Many features have been added to LLVM and clang
// (-fdump-record-layouts, optimization remarks, etc) that print to stdout, so
// users must simply be aware that mixed output and remarks is a possibility.
NFC, I am just updating comments to reflect reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310016
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 4 Aug 2017 01:19:54 +0000 (01:19 +0000)]
Teach GlobalSRA to update the debug info for split-up globals.
This is similar to what we are doing in "regular" SROA and creates
DW_OP_LLVM_fragment operations to describe the resulting variables.
rdar://problem/
33654891
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310014
91177308-0d34-0410-b5e6-
96231b3b80d8
Connor Abbott [Fri, 4 Aug 2017 01:09:43 +0000 (01:09 +0000)]
[AMDGPU] Add missing hazard for DPP-after-EXEC-write
Summary:
Following the docs, we need at least 5 wait states between an EXEC write
and an instruction that uses DPP.
Reviewers: tstellar, arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D34849
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310013
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 4 Aug 2017 00:36:24 +0000 (00:36 +0000)]
[llvm-cov] Ignore unclosed line segments when setting line counts
This patch makes a slight change to the way llvm-cov determines line
execution counts. If there are multiple line segments on a line, the
line count is the max count among the regions which start *and* end on
the line. This avoids an issue posed by deferred regions which start on
the same line as a terminated region, e.g:
if (false)
return; //< The line count should be 0, even though a new region
//< starts at the semi-colon.
foo();
Another change is that counts from line segments which don't correspond
to region entries are considered. This enables the first change, and
corrects an outstanding issue (see the showLineExecutionCounts.cpp test
change).
This is related to D35925.
Testing: check-profile, llvm-cov lit tests
Differential Revision: https://reviews.llvm.org/D36014
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310012
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 4 Aug 2017 00:36:24 +0000 (00:36 +0000)]
[llvm-cov] NFC: make_unique-ify two allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310011
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Fri, 4 Aug 2017 00:26:12 +0000 (00:26 +0000)]
Disable libFuzzer tests on Windows
Differential Revision: https://reviews.llvm.org/D36297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310009
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Fri, 4 Aug 2017 00:25:24 +0000 (00:25 +0000)]
Revert "[TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true"
Breaks check-llvm under ubsan.
This reverts commit r309949.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310008
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 4 Aug 2017 00:00:13 +0000 (00:00 +0000)]
AMDGPU: Remove pointless asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310007
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 3 Aug 2017 23:42:58 +0000 (23:42 +0000)]
Use profile summary to disable peeling for huge working sets
Summary:
Detect when the working set size of a profiled application is huge,
by comparing the number of counts required to reach the hot percentile
in the profile summary to a large threshold*.
When the working set size is determined to be huge, disable peeling
to avoid bloating the working set further.
*Note that the selected threshold (15K) is significantly larger than the
largest working set value in SPEC cpu2006 (which is gcc at around 11K).
Reviewers: davidxl
Subscribers: mehdi_amini, mzolotukhin, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D36288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310005
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 3 Aug 2017 23:32:41 +0000 (23:32 +0000)]
AMDGPU: Don't use report_fatal_error for unsupported call types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310004
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 3 Aug 2017 23:24:05 +0000 (23:24 +0000)]
AMDGPU: Remove error on calls for amdgcn
Repurpose the -amdgpu-function-calls flag. Rather
than require it to emit a call, only use it to
run the always inline path or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310003
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 3 Aug 2017 23:12:44 +0000 (23:12 +0000)]
AMDGPU: Fix implicitarg.ptr handling special inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310002
91177308-0d34-0410-b5e6-
96231b3b80d8
Martell Malone [Thu, 3 Aug 2017 23:12:33 +0000 (23:12 +0000)]
Support: WOA64 and WOA Signals
Reviewers: rnk
Differential Revision: https://reviews.llvm.org/D21813
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310001
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 3 Aug 2017 23:11:52 +0000 (23:11 +0000)]
[llvm-pdbutil] Add an option to only dump specific module indices.
Often something interesting (like a symbol) is in a particular
module, and you don't want to dump symbols from all other 300
modules to see the one you want. This adds a -modi option so that
we only dump the specified module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310000
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 3 Aug 2017 23:00:29 +0000 (23:00 +0000)]
AMDGPU: Pass special input registers to functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309998
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 3 Aug 2017 22:41:12 +0000 (22:41 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309997
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 3 Aug 2017 22:30:46 +0000 (22:30 +0000)]
AMDGPU: Add analysis pass for function argument info
This will allow only adding necessary inputs to callee functions
that need special inputs forwarded from the kernel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309996
91177308-0d34-0410-b5e6-
96231b3b80d8