OSDN Git Service
Xinliang David Li [Wed, 20 Jul 2016 22:53:39 +0000 (22:53 +0000)]
Fix test failure on Win
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276202
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 20 Jul 2016 22:53:30 +0000 (22:53 +0000)]
[CFLAA] Add offset tracking in CFLGraph.
(Also, refactor our constexpr handling to be less insane).
This patch lets us track field offsets in the CFL Graph, which is the
first step to making CFLAA field/offset sensitive. Woohoo! Note that
this patch shouldn't visibly change our behavior (since we make no use
of the offsets we're now tracking), so we can't quite add tests for this
yet.
Patch by Jia Chen.
Differential Revision: https://reviews.llvm.org/D22598
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276201
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Jul 2016 22:44:16 +0000 (22:44 +0000)]
[utils] Add script to check for code coverage regressions
Differential Revision: https://reviews.llvm.org/D22544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276199
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jul 2016 22:24:52 +0000 (22:24 +0000)]
Reapply r276185
Fix the test case that should not depend on dir iteration order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276197
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 20 Jul 2016 22:11:36 +0000 (22:11 +0000)]
[NVPTX] Enable the load-store vectorizer on nvptx.
Reviewers: tra
Subscribers: jholewinski, arsenm, asbirlea
Differential Revision: https://reviews.llvm.org/D22592
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276196
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jul 2016 21:50:38 +0000 (21:50 +0000)]
Revert r276185 -- build bot failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276194
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Wed, 20 Jul 2016 21:45:58 +0000 (21:45 +0000)]
[AArch64] Register AArch64LoadStoreOptimizer so it can be run by llc -run-pass. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276193
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 20 Jul 2016 21:44:26 +0000 (21:44 +0000)]
[OptDiag,LV] Add hotness attribute to analysis remarks
The earlier change added hotness attribute to missed-optimization
remarks. This follows up with the analysis remarks (the ones explaining
the reason for the missed optimization).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276192
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 20 Jul 2016 21:44:22 +0000 (21:44 +0000)]
[OptDiag] Take the IR Value as a const pointer
This helps because LoopAccessReport is passed around as a const
reference and we derive the basic block passed as the Value parameter
from the instruction in LoopAccessReport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276191
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 20 Jul 2016 21:44:18 +0000 (21:44 +0000)]
[OptDiag] Wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276190
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 20 Jul 2016 21:44:07 +0000 (21:44 +0000)]
[NVPTX] Renamed NVPTXLowerKernelArgs -> NVPTXLowerArgs. NFC.
After r276153 the pass applies to both kernels and regular functions.
Differential Revision: https://reviews.llvm.org/D22583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276189
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 20 Jul 2016 21:31:29 +0000 (21:31 +0000)]
[Profile] support directory reading in profile merging
Differential Revision: http://reviews.llvm.org/D22560
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276185
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 20 Jul 2016 21:13:29 +0000 (21:13 +0000)]
GlobalISel: implement Legalization querying framework.
This adds an (incomplete, inefficient) framework for deciding what to do with
some operation on a given type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276184
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 20 Jul 2016 21:12:32 +0000 (21:12 +0000)]
[AArch64][FastISel] Select -O0 legal cmpxchg.
At -O0, cmpxchg survives AtomicExpand: it's mostly straightforward
to select it in fast-isel, and let the pseudo be expanded later.
extractvalues on the result are the tricky part: the generic logic
only works for legal types (and it would be painful to make it
support illegal types), so we can only support i32/i64 cmpxchg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276183
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 20 Jul 2016 21:12:27 +0000 (21:12 +0000)]
[AArch64][FastISel] Select atomic stores into STLR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276182
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 20 Jul 2016 21:05:01 +0000 (21:05 +0000)]
[GVNHoist] Don't hoist PHI nodes
We hoisted PHIs without respecting their special insertion point in the
block, leading to verfier errors.
This fixes PR28626.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276181
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 20 Jul 2016 20:17:13 +0000 (20:17 +0000)]
[SCCP] Zap multiple return values.
We can replace the return values with undef if we replaced all
the call uses with a constant/undef.
Differential Revision: https://reviews.llvm.org/D22336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276174
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 20 Jul 2016 20:07:37 +0000 (20:07 +0000)]
[LSV] Don't move stores across may-load instrs, and loosen restrictions on moving loads.
Summary:
Previously we wouldn't move loads/stores across instructions that had
side-effects, where that was defined as may-write or may-throw. But
this is not sufficiently restrictive: Stores can't safely be moved
across instructions that may load.
This patch also adds a DEBUG check that all instructions in our chain
are either loads or stores.
Reviewers: asbirlea
Subscribers: llvm-commits, jholewinski, arsenm, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22547
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276171
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 20 Jul 2016 20:07:34 +0000 (20:07 +0000)]
[LSV] Vectorize up to side-effecting instructions.
Summary:
Previously if we had a chain that contained a side-effecting
instruction, we wouldn't vectorize it at all. Now we'll vectorize
everything that comes before the side-effecting instruction.
Reviewers: asbirlea
Subscribers: arsenm, jholewinski, llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22536
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276170
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 20 Jul 2016 19:51:34 +0000 (19:51 +0000)]
[MSSA] Add an overload for getClobberingMemoryAccess.
A seemingly common use for the walker's getClobberingMemoryAccess
function is:
```
MemoryAccess *getClobber(MemorySSAWalker *W, MemoryUseOrDef *MUD) {
const Instruction *I = MUD->getMemoryInst();
return W->getClobberingMemoryAccess(I);
}
```
Which is kind of redundant, since walkers will ultimately query MSSA to
find out which MemoryAccess `I` maps to (...which is always `MUD`).
So, this patch adds an overload of getClobberingMemoryAccess that
accepts MemoryAccesses directly. As a result, the Instruction overload
of getClobberingMemoryAccess becomes a lightweight wrapper around our
new overload.
Additionally, this patch un`virtual`izes the Instruction overload of
getClobberingMemoryAccess, since there doesn't seem to be a walker that
benefits from that being virtual, and I can't think of how else one
would implement it. Happy to make it virtual again if we would benefit
from doing so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276169
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 20 Jul 2016 19:41:47 +0000 (19:41 +0000)]
[pdbdump] Use the "flow" style to print out a sequence of uint32_t.
Summary: Lists can be written either with "-" or "[]" in YAML.
Differential Revision: https://reviews.llvm.org/D22579
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276168
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 20 Jul 2016 19:17:29 +0000 (19:17 +0000)]
GlobalISel: properly conditionalize LLT use.
We can't guard the include of LowLevelType.h because getType and setType are
(trivial) functions even when GlobalISel isn't built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276160
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 20 Jul 2016 19:09:30 +0000 (19:09 +0000)]
GlobalISel: implement low-level type with just size & vector lanes.
This should be all the low-level instruction selection needs to determine how
to implement an operation, with the remaining context taken from the opcode
(e.g. G_ADD vs G_FADD) or other flags not based on type (e.g. fast-math).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276158
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 20 Jul 2016 18:54:26 +0000 (18:54 +0000)]
Properly ifdef the use of cpuid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276156
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 20 Jul 2016 18:39:52 +0000 (18:39 +0000)]
[NVPTX] deal with all aggregate return types.
Fixes a crash in llvm_unreachable when a function has array return type.
Differential Revision: https://reviews.llvm.org/D22524
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276154
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 20 Jul 2016 18:39:47 +0000 (18:39 +0000)]
[NVPTX] Improve lowering of byval args of device functions.
Avoid unnecessary spills of byval arguments of device functions to
local space on SASS level and subsequent pointer conversion to generic
address space that follows. Instead, make a local copy in IR, provide
a way to access arguments directly, and let LLVM optimize the copy away
when possible.
Differential Review: https://reviews.llvm.org/D21421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276153
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 20 Jul 2016 18:16:45 +0000 (18:16 +0000)]
[OptDiag] Fix function comment
Function is not passed unlike in the original of this
(llvm::emitOptimizationRemarkMissed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276150
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 20 Jul 2016 18:15:29 +0000 (18:15 +0000)]
[cpu-detection] Cleanup of Host.cpp.
Summary:
Mirroring most cleanup changed from compiler-rt/lib/builtins/cpu_model.
x86 methods are still returning a bool.
Reviewers: llvm-commits, echristo, craig.topper, sanjoy
Subscribers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D22480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276149
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jul 2016 17:58:20 +0000 (17:58 +0000)]
minimize tests and auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276147
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jul 2016 17:18:45 +0000 (17:18 +0000)]
move decomposeBitTestICmp() to Transforms/Utils; NFC
As noted in https://reviews.llvm.org/D22537 , we can use this functionality in
visitSelectInstWithICmp() and InstSimplify, but currently we have duplicated
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276140
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Wed, 20 Jul 2016 16:54:58 +0000 (16:54 +0000)]
Fix test/Analysis/ScalarEvolution/scev-expander-existing-value-offset.ll for rL276136.
The content in this testcase was accidentally duplicated. Fix the error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276139
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Wed, 20 Jul 2016 16:40:33 +0000 (16:40 +0000)]
Use ValueOffsetPair to enhance value reuse during SCEV expansion.
In D12090, the ExprValueMap was added to reuse existing value during SCEV expansion.
However, const folding and sext/zext distribution can make the reuse still difficult.
A simplified case is: suppose we know S1 expands to V1 in ExprValueMap, and
S1 = S2 + C_a
S3 = S2 + C_b
where C_a and C_b are different SCEVConstants. Then we'd like to expand S3 as
V1 - C_a + C_b instead of expanding S2 literally. It is helpful when S2 is a
complex SCEV expr and S2 has no entry in ExprValueMap, which is usually caused
by the fact that S3 is generated from S1 after const folding.
In order to do that, we represent ExprValueMap as a mapping from SCEV to
ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a} into the
ExprValueMap when we create SCEV for V1. When S3 is expanded, it will first
expand S2 to V1 - C_a because of S2->{V1, C_a} in the map, then expand S3 to
V1 - C_a + C_b.
Differential Revision: https://reviews.llvm.org/D21313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276136
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Jul 2016 16:30:55 +0000 (16:30 +0000)]
fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276135
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Jul 2016 15:20:35 +0000 (15:20 +0000)]
AMDGPU: Add missing test coverage for control flow breaks
None of the current lit tests hit si_break handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276129
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Wed, 20 Jul 2016 14:38:06 +0000 (14:38 +0000)]
AMDGPU: Fix bug causing crash due to invalid opencl version metadata.
Differential Revision: https://reviews.llvm.org/D22526
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276119
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 Jul 2016 12:16:38 +0000 (12:16 +0000)]
[docs] Fixing Sphinx warnings to unclog the buildbot
Lots of blocks had "llvm" or "nasm" syntax types but either weren't following
the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type
doesn't even exist (nasm?).
Other documents had :options: what were invalid. I only removed those that had
warnings, and left the ones that didn't, in order to follow the principle of
least surprise.
This is like this for ages, but the buildbot is now failing on errors. It may
take a while to upgrade the buildbot's sphinx, if that's even possible, but
that shouldn't stop us from getting docs updates (which seem down for quite
a while).
Also, we're not losing any syntax highlight, since when it doesn't parse, it
doesn't colour. Ie. those blocks are not being highlighted anyway.
I'm trying to get all docs in one go, so that it's easy to revert later if we
do fix, or at least easy to know what's to fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276109
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 Jul 2016 11:40:16 +0000 (11:40 +0000)]
Revert "[InstCombine] Enable cast-folding in logic(cast(icmp), cast(icmp))"
Makes InstCombine infloop when compiling v8.
This reverts commit r275989 and r276105.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276106
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 20 Jul 2016 11:24:27 +0000 (11:24 +0000)]
[InstCombine] Provide more test cases for cast-folding [NFC]
Summary: In r275989 we enabled the folding of `logic(cast(icmp), cast(icmp))` to `cast(logic(icmp, icmp))`. Here we add more test cases to assure this folding works for all logical operations `and`/`or`/`xor`.
Reviewers: grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22561
Contributed-by: Matthias Reisinger
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276105
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 20 Jul 2016 10:41:28 +0000 (10:41 +0000)]
[X86][SSE] Add cost model values for CTPOP of vectors
This patch adds costs for the vectorized implementations of CTPOP, the default values were seriously underestimating the cost of these and was encouraging vectorization on targets where serialized use of POPCNT would be much better.
Differential Revision: https://reviews.llvm.org/D22456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276104
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 20 Jul 2016 09:48:24 +0000 (09:48 +0000)]
[ARM] Skip inline asm memory operands in DAGToDAGISel
Retry r275776 (no changes, we suspect the issue was with another commit).
The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.
The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.
Fixes PR26038
Differential Revision: https://reviews.llvm.org/D22103
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276101
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 Jul 2016 09:47:09 +0000 (09:47 +0000)]
[docs] fix cmake code-block warning
This will unblock the llvm-sphinx-buildbot, which is currently failing due
to a warning being treated as error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276100
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 Jul 2016 09:38:04 +0000 (09:38 +0000)]
[docs] Add proposals to index file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276099
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 Jul 2016 09:09:58 +0000 (09:09 +0000)]
[docs] GitHub Proposal for LLVM
This document was crafted from the various (320+) emails between 2nd June and
20th July regarding the move to GitHub. It tried to consolidate every issue that
was raised and every solution that was presented to have a GitHub repository
with sub-modules.
It *does not* try to argue whether sub-modules are better or worse than any other
Git solution, nor if Git is better than any other VCS, nor if GitHub is better
than any other free code hosting service. This is just the final conclusions of
48 days and 320 emails (plus a lot of IRC discussions) on the LLVM community.
This document will be presented at the survey that the foundation will setup for
us to decide if we move to this solution or not. It reflects what was discussed
on the lists, but it's not authoritative. If something is not clear enough,
please refer to the mailing list discussions (hint: search for "GitHub").
Review: https://reviews.llvm.org/D22463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276097
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jul 2016 05:05:50 +0000 (05:05 +0000)]
[AVX512] Add a missing NoVLX to give priority to the AVX512 version of the pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276088
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jul 2016 05:05:48 +0000 (05:05 +0000)]
[X86] Use 'HasAVX1Only' to properly give priority to the AVX2 version without relying on file ordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276087
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jul 2016 05:05:46 +0000 (05:05 +0000)]
[X86] Create some multiclasses to reduce the repeated patterns for VEXTRACT(F/I)128/VINSERT(I/F)128. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276086
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jul 2016 05:05:44 +0000 (05:05 +0000)]
[X86] Create some wrapper multiclasses to create AVX and SSE shift instructions with less repeated code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276085
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 20 Jul 2016 04:13:05 +0000 (04:13 +0000)]
Forgot to add a test for r276008.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276082
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 20 Jul 2016 04:13:01 +0000 (04:13 +0000)]
Revert "Disable this-return argument forwarding on ARM/AArch64"
Inference of the 'returned' attribute was fixed in r276008, lets try
turning the backend support back on.
This reverts commit r275677.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276081
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 20 Jul 2016 04:03:43 +0000 (04:03 +0000)]
[LV] Add hotness attribute to missed-optimization remarks
The new OptimizationRemarkEmitter analysis pass is hooked up to both new
and old PM passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276080
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Wed, 20 Jul 2016 01:55:27 +0000 (01:55 +0000)]
Revert "Revert r275883 and r275891. They seem to cause PR28608."
This reverts commit r276064, and thus reapplies r275891 and r275883 with
a fix for PR28608.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276077
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 20 Jul 2016 01:16:28 +0000 (01:16 +0000)]
llvm-readobj: add some more aliases
Alias -d and -t from readelf in llvm-readobj which effectively replaces the
tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276075
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Wed, 20 Jul 2016 00:55:12 +0000 (00:55 +0000)]
[LSV] Don't assume that loads/stores appear in address order in the BB.
Summary:
getVectorizablePrefix previously didn't work properly in the face of
aliasing loads/stores. It unwittingly assumed that the loads/stores
appeared in the BB in address order. If they didn't, it would do the
wrong thing.
Reviewers: asbirlea, tstellarAMD
Subscribers: arsenm, llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22535
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276072
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Wed, 20 Jul 2016 00:40:54 +0000 (00:40 +0000)]
Fixing a few places in this doc which look like obvious typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276070
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 Jul 2016 00:21:32 +0000 (00:21 +0000)]
Revert "RegScavenging: Add scavengeRegisterBackwards()"
Reverting this commit for now as it seems to be causing failures on
test-suite tests on the clang-ppc64le-linux-lnt bot.
This reverts commit r276044.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276068
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 20 Jul 2016 00:01:51 +0000 (00:01 +0000)]
Codegen: Tail Duplication: Only duplicate into layout pred if it is a CFG Pred.
Add a check that the layout predecessor of a block is an actual CFG
predecssor of the block as well. No current code fails this check, but
upcoming patches can trigger this, and it makes sense to separate it
out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276066
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 19 Jul 2016 23:54:29 +0000 (23:54 +0000)]
Revert r275883 and r275891. They seem to cause PR28608.
Revert "[LoopSimplify] Update LCSSA after separating nested loops."
This reverts commit r275891.
Revert "[LCSSA] Post-process PHI-nodes created by SSAUpdate when constructing LCSSA form."
This reverts commit r275883.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276064
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 19 Jul 2016 23:54:23 +0000 (23:54 +0000)]
[PM] Port LoopUnroll.
We just set PreserveLCSSA to always true since we don't have an
analogous method `mustPreserveAnalysisID(LCSSA)`.
Also port LoopInfo verifier pass to test LoopUnrollPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276063
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Tue, 19 Jul 2016 23:54:21 +0000 (23:54 +0000)]
Codegen: Factor out canTailDuplicate
canTailDuplicate accepts two blocks and returns true if the first can be
duplicated into the second successfully. Use this function to
encapsulate the heuristic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276062
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 19 Jul 2016 23:50:11 +0000 (23:50 +0000)]
This code block breaks the docs build (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11925/steps/docs-llvm-html/logs/stdio). Setting the code highlighting to none instead of llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276060
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:19:25 +0000 (23:19 +0000)]
[ADT] Warn on unused results from ArrayRef and StringRef functions that read like they might mutate.
Summary:
Functions like "slice" and "drop_front" sound like they might mutate the
underlying object, but they don't. Warning on unused results would have
saved me an hour yesterday, and I'm sure I'm not the only one.
LLVM and Clang are clean wrt this warning after D22540.
Reviewers: majnemer
Subscribers: sanjoy, chandlerc, llvm-commits
Differential Revision: https://reviews.llvm.org/D22541
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276058
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:19:22 +0000 (23:19 +0000)]
Get rid of call to StringRef::substr that's never used.
Summary: substr doesn't modify the string, so this line has no effect.
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276057
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:19:20 +0000 (23:19 +0000)]
[LSV] Insert stores at the right point.
Summary:
Previously, the insertion point for stores was the last instruction in
Chain *before calling getVectorizablePrefixEndIdx*. Thus if
getVectorizablePrefixEndIdx didn't return Chain.size(), we still would
insert at the last instruction in Chain.
This patch changes our internal API a bit in an attempt to make it less
prone to this sort of error. As a result, we end up recalculating the
Chain's boundary instructions, but I think worrying about the speed hit
of this is a premature optimization right now.
Reviewers: asbirlea, tstellarAMD
Subscribers: mzolotukhin, arsenm, llvm-commits
Differential Revision: https://reviews.llvm.org/D22534
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276056
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:19:18 +0000 (23:19 +0000)]
[LSV] Use make_range, and reformat a DEBUG message. NFC
Summary:
The DEBUG message was hard to read because two Values were being printed
on the same line with only the delimiter "aliases". This change makes
us print each Value on its own line.
Reviewers: asbirlea
Subscribers: llvm-commits, arsenm, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276055
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:19:16 +0000 (23:19 +0000)]
[LSV] Nix two global (ish) variables in the LoadStoreVectorizer. NFC
Reviewers: asbirlea
Subscribers: mzolotukhin, llvm-commits, arsenm
Differential Revision: https://reviews.llvm.org/D22532
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276054
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Tue, 19 Jul 2016 23:18:59 +0000 (23:18 +0000)]
[LSV] Add detail to correct-order.ll test.
Summary:
This helps keep us honest -- there were a number of ways we could screw
up and still have passed this test.
Reviewers: asbirlea
Subscribers: llvm-commits, arsenm
Differential Revision: https://reviews.llvm.org/D22531
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276053
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 Jul 2016 23:18:28 +0000 (23:18 +0000)]
[libFuzzer] extend the messages printed by afl_driver
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276052
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 19 Jul 2016 23:16:53 +0000 (23:16 +0000)]
AMDGPU: Change fdiv lowering based on !fpmath metadata
If 2.5 ulp is acceptable, denormals are not required, and
isn't a reciprocal which will already be handled, replace
with a faster fdiv.
Simplify the lowering tests by using per function
subtarget features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276051
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Tue, 19 Jul 2016 23:08:08 +0000 (23:08 +0000)]
Fix unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276050
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Tue, 19 Jul 2016 22:57:14 +0000 (22:57 +0000)]
Make GVN Hoisting obey optnone/bisect.
Differential Revision: http://reviews.llvm.org/D22545
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276048
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Tue, 19 Jul 2016 22:49:43 +0000 (22:49 +0000)]
Make MemorySSA::dominates/locallydominates constant time
Summary: Make MemorySSA::dominates/locallydominates constant time
Reviewers: george.burgess.iv, gberry
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D22527
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276046
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 19 Jul 2016 22:46:39 +0000 (22:46 +0000)]
Add AIX support to Path.inc, Host.h, and CMake.
Patch by Andrew Paprocki!
Differential Revision: https://reviews.llvm.org/D18359
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276045
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 19 Jul 2016 22:37:09 +0000 (22:37 +0000)]
RegScavenging: Add scavengeRegisterBackwards()
This is a variant of scavengeRegister() that works for
enterBasicBlockEnd()/backward(). The benefit of the backward mode is
that it is not affected by incomplete kill flags.
This patch also changes
PrologEpilogInserter::doScavengeFrameVirtualRegs() to use the register
scavenger in backwards mode.
Differential Revision: http://reviews.llvm.org/D21885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276044
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 19 Jul 2016 22:37:02 +0000 (22:37 +0000)]
RegisterScavenger: Introduce backward() mode.
This adds two pieces:
- RegisterScavenger:::enterBasicBlockEnd() which behaves similar to
enterBasicBlock() but starts tracking at the end of the basic block.
- A RegisterScavenger::backward() method. It is subtly different
from the existing unprocess() method which only considers uses with
the kill flag set: If a value is dead at the end of a basic block with
a last use inside the basic block, unprocess() will fail to mark it as
live. However we cannot change/fix this behaviour because unprocess()
needs to perform the exact reverse operation of forward().
Differential Revision: http://reviews.llvm.org/D21873
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276043
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jul 2016 22:32:15 +0000 (22:32 +0000)]
regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276042
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 19 Jul 2016 22:31:11 +0000 (22:31 +0000)]
[AArch64] Properly validate the reciprocal estimation.
Add check for legal data types when expanding into a Newton series.
Differential Revision: https://reviews.llvm.org/D22267
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276041
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jul 2016 22:09:34 +0000 (22:09 +0000)]
[InstCombine] fold add(zext(xor X, C), C) --> sext X when C is INT_MIN in the source type
The pattern may look more obviously like a sext if written as:
define i32 @g(i16 %x) {
%zext = zext i16 %x to i32
%xor = xor i32 %zext, 32768
%add = add i32 %xor, -32768
ret i32 %add
}
We already have that fold in visitAdd().
Differential Revision: https://reviews.llvm.org/D22477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276035
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 19 Jul 2016 21:35:47 +0000 (21:35 +0000)]
Attempt to appease MSVC buildbots.
Broken by r276026.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276032
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 19 Jul 2016 21:16:30 +0000 (21:16 +0000)]
[AMDGPU] Remove spurious line (should've been removed in r276029).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276030
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 19 Jul 2016 21:10:49 +0000 (21:10 +0000)]
[AMDGPU] Remove dead code.
LGTM'd by Matt Arsenault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276029
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 19 Jul 2016 20:56:41 +0000 (20:56 +0000)]
[CFLAA] Make a test tell the truth. NFC.
Dishonesty noted by Jia Chen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276028
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 19 Jul 2016 20:47:15 +0000 (20:47 +0000)]
[CFLAA] Add some interproc. analysis to CFLAnders.
This patch adds function summary support to CFLAnders. It also comes
with a lot of tests! Woohoo!
Patch by Jia Chen.
Differential Revision: https://reviews.llvm.org/D22450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276026
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 19 Jul 2016 20:47:07 +0000 (20:47 +0000)]
Next step along the way to getting good error messages for bad archives.
This step builds on Lang Hames work to change Archive::child_iterator
for better interoperation with Error/Expected. Building on that it is now
possible to return an error message when the size field of an archive
contains non-decimal characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276025
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 Jul 2016 20:47:00 +0000 (20:47 +0000)]
add even more missing tests for simplifySelectBitTest()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276024
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 19 Jul 2016 20:38:21 +0000 (20:38 +0000)]
[CFLAA] Teach CFLAnders to distinguish reads from writes.
This patch adds more specific edges to CFLAndersAliasAnalysis. The goal
of these edges is to give us more information about *how* two values
that MayAlias alias. With this, we can now tell cases like
a = b; // ergo, a may alias b
apart from
a = c;
b = c;
// so, a may alias b, but only because they were both assigned to c.
...And others.
Patch by Jia Chen.
Differential Revision: https://reviews.llvm.org/D22429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276023
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 19 Jul 2016 20:20:03 +0000 (20:20 +0000)]
This code block breaks the docs build (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11921/steps/docs-llvm-html/logs/stdio). Setting the code highlighting to none instead of llvm to hopefully get the bot stumbling back towards green.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276018
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jul 2016 20:19:56 +0000 (20:19 +0000)]
Use posix_fallocate instead of ftruncate.
This makes sure that space is actually available. With this change
running lld on a full file system causes it to exit with
failed to open foo: No space left on device
instead of crashing with a sigbus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276017
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 19 Jul 2016 20:16:08 +0000 (20:16 +0000)]
[tsan] Don't instrument __llvm_gcov_global_state_pred or __llvm_gcda*
r274801 did not go far enough to allow gcov+tsan to cooperate. With this
commit it's possible to run the following code without false positives:
std::thread T1(fib), T2(fib);
T1.join(); T2.join();
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276015
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 19 Jul 2016 19:49:13 +0000 (19:49 +0000)]
ARM: move feature for Thumb2 pkhbt/pkhtb onto architectures.
There's not much functional change, but it really is an architectural feature
(on v6T2, v7A, v7R and v7EM) rather than something each CPU implements
individually.
The main functional change is the default behaviour you get when specifying
only "-triple".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276013
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 19 Jul 2016 19:48:36 +0000 (19:48 +0000)]
[GlobalISel] Mark newly-created gvregs as having a bank.
Also verify that we never try to set the size of a vreg associated
to a register class.
Report an error when we encounter that in MIR. Fix a testcase that
hit that error and had a size for no reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276012
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 19 Jul 2016 19:47:06 +0000 (19:47 +0000)]
[GlobalISel] Simplify more RegClassOrRegBank is+get. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276011
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jul 2016 18:50:26 +0000 (18:50 +0000)]
[FunctionAttrs] Correct the safety analysis for inference of 'returned'
We skipped over ReturnInsts which didn't return an argument which would
lead us to incorrectly conclude that an argument returned by another
ReturnInst was 'returned'.
This reverts commit r275756.
This fixes PR28610.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276008
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 19 Jul 2016 18:31:07 +0000 (18:31 +0000)]
[SCCP] Improve assert messages. NFCI.
I've been hitting those already while working on SCCP and I think
it's be useful to provide a more explanatory diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276007
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 Jul 2016 18:29:06 +0000 (18:29 +0000)]
[libFuzzer] properly intercept memmem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276006
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jul 2016 18:11:11 +0000 (18:11 +0000)]
[DSE] Add additional debug output. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276005
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jul 2016 17:52:41 +0000 (17:52 +0000)]
Add a testcase for r275581
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276002
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jul 2016 17:50:30 +0000 (17:50 +0000)]
[RegionInfo] Some cleanups
- Use unique_ptr instead of managing a container of new'd pointers.
- Use range based for loops.
No functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276001
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jul 2016 17:50:27 +0000 (17:50 +0000)]
[RegionPass] Some minor cleanups
No functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276000
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Jul 2016 17:50:24 +0000 (17:50 +0000)]
[LoopPass] Some minor cleanups
No functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275999
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 19 Jul 2016 17:46:55 +0000 (17:46 +0000)]
This code block breaks the docs build (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11920/steps/docs-llvm-html/logs/stdio), but I cannot see anything immediately wrong with it and cannot reproduce the diagnostic locally. Setting the code highlighting to none instead of nasm to hopefully get the bot stumbling back towards green.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275998
91177308-0d34-0410-b5e6-
96231b3b80d8