OSDN Git Service
Matthias Braun [Fri, 19 Aug 2016 03:03:24 +0000 (03:03 +0000)]
Revert "RegScavenging: Add scavengeRegisterBackwards()"
The ppc64 multistage bot fails on this.
This reverts commit r279124.
Also Revert "CodeGen: Add/Factor out LiveRegUnits class; NFCI" because it depends on the previous change
This reverts commit r279171.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279199
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 19 Aug 2016 02:07:51 +0000 (02:07 +0000)]
[ADT] Add the worlds simplest STL extra. Or at least close to it.
This is a little class template that just builds an inheritance chain of
empty classes. Despite how simple this is, it can be used to really
nicely create ranked overload sets. I've added a unittest as much to
document this as test it. You can pass an object of this type as an
argument to a function overload set an it will call the first viable and
enabled candidate at or below the rank of the object.
I'm planning to use this in a subsequent commit to more clearly rank
overload candidates used for SFINAE. All credit for this technique and
both lines of code here to Richard Smith who was helping me rewrite the
SFINAE check in question to much more effectively capture the intended
set of checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279197
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 19 Aug 2016 01:15:39 +0000 (01:15 +0000)]
[RuntimeDyld] Add support for ELF R_ARM_REL32 and R_ARM_GOT_PREL.
Patch by William Dillon. Thanks William!
This patch adds support for the R_ARM_REL32 and R_ARM_GOT_PREL ELF ARM
relocations to RuntimeDyld, which should allow JITing of code that
produces these relocations.
No test case: Unfortunately RuntimeDyldELF's GOT building mechanism (which
uses a separate section for GOT entries) isn't compatible with
RuntimeDyldChecker. The correct fix for this is to fix RuntimeDyldELF's GOT
support (it's fundamentally broken at the moment: separate sections aren't
guaranteed to be in range of a GOT entry load), but that's a non-trivial job.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279182
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 18 Aug 2016 23:51:15 +0000 (23:51 +0000)]
[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Summary: Reduce store size to avoid leading and trailing zeros.
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279178
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 18 Aug 2016 22:49:51 +0000 (22:49 +0000)]
Include X86CallFrameOptimization in the opt-bisect process.
Differential Revision: https://reviews.llvm.org/D23683
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279175
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 18 Aug 2016 22:35:06 +0000 (22:35 +0000)]
AArch64: remove extraneous padding
The structs BarrierOp, PrefetchOp, PSBHintOp are in AArch64AsmParser.cpp
(inside anonymous namespace). This diff changes the order of fields and
removes the excessive padding (8 bytes).
Patch by Alexander Shaposhnikov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279173
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 22:18:11 +0000 (22:18 +0000)]
[CMake] Add variables for tracking which runtimes are included
This allows sub-projects to have conditionals based on the presence of other projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279172
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 18 Aug 2016 22:11:28 +0000 (22:11 +0000)]
CodeGen: Add/Factor out LiveRegUnits class; NFCI
This is a set of register units intended to track register liveness, it
is similar in spirit to LivePhysRegs.
You can also think of this as the liveness tracking parts of the
RegisterScavenger factored out into an own class.
This was proposed in http://llvm.org/PR27609
Differential Revision: http://reviews.llvm.org/D21916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279171
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Thu, 18 Aug 2016 22:10:06 +0000 (22:10 +0000)]
Fix link quotes on AArch64's CompilerWriterInfo section.
Reviewers: t.p.northover
Subscribers: t.p.northover, aemerson, rengolin
Differential Revision: https://reviews.llvm.org/D23697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279169
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Thu, 18 Aug 2016 22:09:27 +0000 (22:09 +0000)]
CodeGen: If Convert blocks that would form a diamond when tail-merged.
The following function currently relies on tail-merging for if
conversion to succeed. The common tail of cond_true and cond_false is
extracted, and this then forms a diamond pattern that can be
successfully if converted.
If this block does not get extracted, either because tail-merging is
disabled or the threshold is higher, we should still recognize this
pattern and if-convert it.
Fixed a regression in the original commit. Need to un-reverse branches after
reversing them, or other conversions go awry.
Regression on self-hosting bots with no obvious explanation. Tidied up range
handling to be more obviously correct, but there was no smoking gun.
define i32 @t2(i32 %a, i32 %b) nounwind {
entry:
%tmp1434 = icmp eq i32 %a, %b ; <i1> [#uses=1]
br i1 %tmp1434, label %bb17, label %bb.outer
bb.outer: ; preds = %cond_false, %entry
%b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ]
%a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ]
br label %bb
bb: ; preds = %cond_true, %bb.outer
%indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ]
%tmp. = sub i32 0, %b_addr.021.0.ph
%tmp.40 = mul i32 %indvar, %tmp.
%a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph
%tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph
br i1 %tmp3, label %cond_true, label %cond_false
cond_true: ; preds = %bb
%tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph
%tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph
%indvar.next = add i32 %indvar, 1
br i1 %tmp1437, label %bb17, label %bb
cond_false: ; preds = %bb
%tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0
%tmp14 = icmp eq i32 %a_addr.026.0, %tmp10
br i1 %tmp14, label %bb17, label %bb.outer
bb17: ; preds = %cond_false, %cond_true, %entry
%a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ]
ret i32 %a_addr.026.1
}
Without tail-merging or diamond-tail if conversion:
LBB1_1: @ %bb
@ =>This Inner Loop Header: Depth=1
cmp r0, r1
ble LBB1_3
@ BB#2: @ %cond_true
@ in Loop: Header=BB1_1 Depth=1
subs r0, r0, r1
cmp r1, r0
it ne
cmpne r0, r1
bgt LBB1_4
LBB1_3: @ %cond_false
@ in Loop: Header=BB1_1 Depth=1
subs r1, r1, r0
cmp r1, r0
bne LBB1_1
LBB1_4: @ %bb17
bx lr
With diamond-tail if conversion, but without tail-merging:
@ BB#0: @ %entry
cmp r0, r1
it eq
bxeq lr
LBB1_1: @ %bb
@ =>This Inner Loop Header: Depth=1
cmp r0, r1
ite le
suble r1, r1, r0
subgt r0, r0, r1
cmp r1, r0
bne LBB1_1
@ BB#2: @ %bb17
bx lr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279168
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Thu, 18 Aug 2016 22:09:25 +0000 (22:09 +0000)]
IfConversion: Rescan diamonds.
The cost of predicating a diamond is only the instructions that are not shared
between the two branches. Additionally If a predicate clobbering instruction
occurs in the shared portion of the branches (e.g. a cond move), it may still
be possible to if convert the sub-cfg. This change handles these two facts by
rescanning the non-shared portion of a diamond sub-cfg to recalculate both the
predication cost and whether both blocks are pred-clobbering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279167
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Thu, 18 Aug 2016 22:09:23 +0000 (22:09 +0000)]
IfConversion: Handle inclusive ranges more carefully.
This may affect calculations for thresholds, but is not a significant change
in behavior.
The problem was that an inclusive range must have an additonal flag to showr
that it is empty, because otherwise begin == end implies that the range has one
element, and it may not be possible to move past on either side.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279166
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Thu, 18 Aug 2016 21:50:13 +0000 (21:50 +0000)]
llvm-objdump: Add Hexagon printer changes for -S/-l options
Differential Revision: https://reviews.llvm.org/D23521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 21:47:18 +0000 (21:47 +0000)]
[CMake] Create convenience targets for runtime projects
Each runtime project has a top-level target that is the name of the runtime (minus the "lib" prefix if applicable). This creates top-level targets mapping to runtime projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279160
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhan Jun Liau [Thu, 18 Aug 2016 21:44:15 +0000 (21:44 +0000)]
[SystemZ] Use valid base/index regs for inline asm
Summary:
Inline asm memory constraints can have the base or index register be assigned
to %r0 right now. Make sure that we assign only ADDR64 registers to the base
and index.
Reviewers: uweigand
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23367
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279157
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Thu, 18 Aug 2016 21:41:24 +0000 (21:41 +0000)]
[Analysis] Change several Analysis pieces to use NodeRef. NFC.
Reviewers: dblaikie, grosser
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23625
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279156
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 21:41:21 +0000 (21:41 +0000)]
[CMake] Make llvm-config implicit dependency for subprojects
The subproject interface being used for runtime libraries expects that llvm-config is passed into the subproject for consumption. We currently do this for every subproject, so we should expect that all LLVM ExternalProjects depend on llvm-config for the time being.
Eventually I'd like to see the sub-projects using LLVMConfig.cmake instead of the llvm-config binary, but that will take time to roll out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279155
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 21:36:36 +0000 (21:36 +0000)]
[CMake] Minor fix to regex in r279152
The third version component is optional in Xcode's version spew, so we need to make it optional in the regex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 21:32:48 +0000 (21:32 +0000)]
[CMake] Support for generating Xcode 8 compatible toolchains
Xcode 8 requires toolchain compatibility version 2. This allows us to select the correct compatibility version based on the installed version of Xcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279152
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 21:28:30 +0000 (21:28 +0000)]
[InstCombine] add helper function for folds of icmp (shl 1, Y), C; NFCI
Clean up the existing code by:
1. Renaming variables
2. Adding local variables
3. Making it vector-safe
This is still guarded by a ConstantInt check, so no functional change is intended.
But this should be ready to go: if we move the ConstantInt check down, all of
these folds should do the right thing for vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279150
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Thu, 18 Aug 2016 21:25:17 +0000 (21:25 +0000)]
[lanai] Add ISA document to CompilerWritersInfo
Summary: Add Lanai ISA document to CompilerWritersInfo.
Reviewers: eliben
Subscribers: aemerson, llvm-commits
Differential Revision: https://reviews.llvm.org/D23693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279149
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 18 Aug 2016 21:21:53 +0000 (21:21 +0000)]
AMDGPU/SI: Fix a test in wqm.ll to always use s_cbranch_vcc*
Summary:
We need to use floating-point compares to ensure that s_cbranch_vcc*
instructions are always generated. With integer compares, future
optimizations could cause s_cbranch_scc* to be generated instead.
Reviewers: arsenm, nhaehnle
Subscribers: llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D23401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279148
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 18 Aug 2016 20:52:52 +0000 (20:52 +0000)]
[libFuzzer] add more __attribute__((visibility("default")))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279143
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Thu, 18 Aug 2016 20:43:50 +0000 (20:43 +0000)]
Make cltz and cttz zero undef when the operand cannot be zero in InstCombine
Summary: Also add popcount(n) == bitsize(n) -> n == -1 transformation.
Reviewers: majnemer, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279141
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 20:28:54 +0000 (20:28 +0000)]
[InstCombine] use m_APInt to allow icmp (trunc X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
https://reviews.llvm.org/rL278935
https://reviews.llvm.org/rL278945
https://reviews.llvm.org/rL279066
https://reviews.llvm.org/rL279077
https://reviews.llvm.org/rL279101
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279133
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 20:25:16 +0000 (20:25 +0000)]
[InstCombine] clean up foldICmpTruncConstant(); NFCI
1. Fix variable names
2. Add local variables to reduce code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279132
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 18 Aug 2016 20:08:15 +0000 (20:08 +0000)]
[SelectionDAG] Rename fextend -> fpextend, fround -> fpround, frnd -> fround
The names of the tablegen defs now match the names of the ISD nodes.
This makes the world a slightly saner place, as previously "fround" matched
ISD::FP_ROUND and not ISD::FROUND.
Differential Revision: https://reviews.llvm.org/D23597
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279129
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Ding [Thu, 18 Aug 2016 19:51:14 +0000 (19:51 +0000)]
AMDGPU : Fix QSAD and MQSAD instructions' incorrect data type.
Differential Revision: http://reviews.llvm.org/D23689
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279126
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 18 Aug 2016 19:50:32 +0000 (19:50 +0000)]
[SLP] Initialize VectorizedValue when gathering
We abort building vectorizable trees in some cases (e.g., if the maximum
recursion depth is reached, if the region size is too large, etc.). If this
happens for a reduction, we can be left with a root entry that needs to be
gathered. For these cases, we need make sure we actually set VectorizedValue to
the resulting vector.
This patch ensures we properly set VectorizedValue, and it also ensures the
insertelement sequence generated for the gathers is inserted at the correct
location.
Reference: https://llvm.org/bugs/show_bug.cgi?id=28330
Differential Revison: https://reviews.llvm.org/D23410
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279125
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 18 Aug 2016 19:47:59 +0000 (19:47 +0000)]
RegScavenging: Add scavengeRegisterBackwards()
Re-apply r276044 with off-by-1 instruction fix for the reload placement.
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@279124
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Thu, 18 Aug 2016 18:57:29 +0000 (18:57 +0000)]
Branch Folding: Accept explicit threshold for tail merge size.
This is prep work for allowing the threshold to be different during layout,
and to enforce a single threshold between merging and duplicating during
layout. No observable change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279117
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 18 Aug 2016 18:30:54 +0000 (18:30 +0000)]
Add a version of Intrinsic::getName which is more efficient when there are no overloads.
When running 'opt -O2 verify-uselistorder-nodbg.lto.bc', there are 33m allocations. 8.2m
come from std::string allocations in Intrinsic::getName(). Turns out this method only
returns a std::string because it needs to handle overloads, but that is not the common case.
This adds an overload of getName which just returns a StringRef when there are no overloads
and so saves on the allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279113
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Aug 2016 18:19:28 +0000 (18:19 +0000)]
[X86][SSE] Missed insertps shuffle patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 18 Aug 2016 18:17:28 +0000 (18:17 +0000)]
[CMake] Silence message on multi-configuration generators
The Xcode and Visual Studio generators always log "-- No build type selected, default to Debug". This is because CMake doesn't initialize "CMAKE_CONFIGURATION_TYPES" until the generator's EnableLanguage call gets hit.
The first place EnableLanguage gets hit in our configuration is in the project() call. Since CMAKE_BUILD_TYPE isn't used until after we call project() it is safe to just move this check down a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279110
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 18 Aug 2016 18:17:19 +0000 (18:17 +0000)]
[asan] Extend test
Summary: PR27453
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23647
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279109
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Thu, 18 Aug 2016 18:06:20 +0000 (18:06 +0000)]
[AMDGPU] add s_incperflevel/s_decperflevel intrinsics.
Differential revision: https://reviews.llvm.org/D23666
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279106
91177308-0d34-0410-b5e6-
96231b3b80d8
Elliot Colp [Thu, 18 Aug 2016 18:04:26 +0000 (18:04 +0000)]
Fix SystemZ compilation abort caused by negative AND mask
Normally, when an AND with a constant is lowered to NILL, the constant value is truncated to 16 bits. However, since r274066, ANDs whose results are used in a shift are caught by a different pattern that does not truncate. The instruction printer expects a 16-bit unsigned immediate operand for NILL, so this results in an abort.
This patch adds code to manually truncate the constant in this situation. The rest of the bits are then set, so we will detect a case for NILL "naturally" rather than using peephole optimizations.
Differential Revision: http://reviews.llvm.org/D21854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279105
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 18 Aug 2016 17:58:09 +0000 (17:58 +0000)]
AArch64: Don't call getIterator() on iterators
Remove an unnecessary round-trip:
iterator => operator->() => getIterator()
In some cases, the iterator is end(), so the dereference of operator->
is invalid (UB).
The testcase only crashes with r278974 (currently reverted to
investigate this), which adds an assertion for invalid dereferences of
ilist nodes.
Fixes PR29035.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279104
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Thu, 18 Aug 2016 17:56:27 +0000 (17:56 +0000)]
[LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings
Differential revision: https://reviews.llvm.org/D23675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279102
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 17:55:59 +0000 (17:55 +0000)]
[InstCombine] use m_APInt to allow icmp (udiv X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
https://reviews.llvm.org/rL278935
https://reviews.llvm.org/rL278945
https://reviews.llvm.org/rL279066
https://reviews.llvm.org/rL279077
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279101
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 18 Aug 2016 17:51:27 +0000 (17:51 +0000)]
[WebAssembly] Disable the store-results optimization.
The WebAssemly spec removing the return value from store instructions, so
remove the associated optimization from LLVM.
This patch leaves the store instruction operands in place for now, so stores
now always write to "$drop"; these will be removed in a seperate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 18 Aug 2016 17:51:24 +0000 (17:51 +0000)]
[Assumptions] Make collecting ephemeral values not quadratic in the
number of assume intrinsics.
The classical way to have a cache-friendly vector style container when
we need queue semantics for BFS instead of stack semantics for DFS is to
use an ever-growing vector and an index. Erasing from the front requires
O(size) work, and unless we expect the worklist to grow *very* large,
its probably cheaper to just grow and race down the list.
But that makes it more bad that we're putting the assume intrinsics in
this at all. We end up looking at the (by definition empty) use list to
see if they're ephemeral (when we've already put them in that set), etc.
Instead, directly populate the worklist with the operands when we mark
the assume intrinsics as ephemeral. Also, test the visited set *before*
putting things into the worklist so we don't accumulate the same value
in the list 100s of times.
It would be nice to use a set-vector for this but I think its useful to
test the set earlier to avoid repeatedly querying whether the same
instruction is safe to speculate.
Hopefully with these changes the number of values pushed onto the
worklist is smaller, and we avoid quadratic work by letting it grow as
necessary.
Differential Revision: https://reviews.llvm.org/D23396
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279099
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 18 Aug 2016 17:39:53 +0000 (17:39 +0000)]
Fix -Wpessimizing-move error, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279095
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 17:37:26 +0000 (17:37 +0000)]
[InstCombine] clean up foldICmpUDivConstant; NFC
1. Better variable names
2. Remove unnecessary check of ConstantInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279094
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 18 Aug 2016 17:15:25 +0000 (17:15 +0000)]
Reapply "ADT: Remove references in has_rbegin for reverse()"
This reverts commit r279086, reapplying r279084. I'm not sure what I
ran before, because the compile failure for ADTTests reproduced locally.
The problem is that TestRev is calling BidirectionalVector::rbegin()
when the BidirectionalVector is const, but rbegin() is always non-const.
I've updated BidirectionalVector::rbegin() to be callable from const.
Original commit message follows.
--
As a follow-up to r278991, add some tests that check that
decltype(reverse(R).begin()) == decltype(R.rbegin()), and get them
passing by adding std::remove_reference to has_rbegin.
I'm using static_assert instead of EXPECT_TRUE (and updated the other
has_rbegin check from r278991 in the same way) since I figure that's
more helpful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279091
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 18 Aug 2016 16:49:29 +0000 (16:49 +0000)]
Resubmit "Write the TPI stream from a PDB to Yaml."
The original patch was breaking some buildbots due to an
incorrect ordering of function definitions which caused some
compilers to recognize a definition but others to not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279089
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 18 Aug 2016 16:39:19 +0000 (16:39 +0000)]
llvm-objdump: add coff import library symbol listing support
This adds behaviour similar to binutils' objdump which can show symbols in an
import library. Differences from that stem around the fact that we do not
create section symbols nor the all import import descriptor symbol reference.
However, this does mean that the tool can serve as a possible replacement for
the existing tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279088
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 18 Aug 2016 16:27:41 +0000 (16:27 +0000)]
Revert "ADT: Remove references in has_rbegin for reverse()"
This reverts commit r279084, since it failed on a bot:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/41733
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279086
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 18 Aug 2016 16:22:54 +0000 (16:22 +0000)]
ADT: Remove references in has_rbegin for reverse()
As a follow-up to r278991, add some tests that check that
decltype(reverse(R).begin()) == decltype(R.rbegin()), and get them
passing by adding std::remove_reference to has_rbegin.
I'm using static_assert instead of EXPECT_TRUE (and updated the other
has_rbegin check from r278991 in the same way) since I figure that's
more helpful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279084
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Thu, 18 Aug 2016 16:08:35 +0000 (16:08 +0000)]
CVP. Turn marking adds as no wrap (introduced by r278107) off by default
It causes a regression on our internal benchmark. Introduce cvp-dont-process flag and set it off by default while investigating the regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279082
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 18 Aug 2016 16:05:11 +0000 (16:05 +0000)]
[AArch64][GlobalISel] Select floating-point binary ops.
There is no FREM instruction, but the others are straightforward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279081
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 18 Aug 2016 16:05:06 +0000 (16:05 +0000)]
[GlobalISel] Add floating-point binary ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279080
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 18 Aug 2016 15:55:49 +0000 (15:55 +0000)]
[IRCE] Switch over to LLVM_DUMP_METHOD. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279079
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Thu, 18 Aug 2016 15:50:11 +0000 (15:50 +0000)]
[ARM] Correct ARMv8*-A optional extension definitions in TargetParser
The ARMv8*-A descriptions in the ARM and AArch64 TargetParsers are incorrect
architecturally and mismatched to the backend descriptions.
RAS is an optional extension to ARMv8-A and ARMv8.1-A and mandatory in
ARMv8.2-A. Correct the ARMTargetParser descriptions which had this as enabled
by default in the earlier versions.
The FP16 and SPE extensions are optional in ARMv8.2-A and the backend defaults
them as off. They are not available as extensions to earlier ARMv8-A versions.
Correct the AArch64TargetParser which had these as enabled by default in all
ARMv8-A definitions.
These macros are only used to define preprocessor macros. There are no macros
yet as ACLE has not caught up with ARMv8.2-A so not possible to add a test.
Differential Revision: https://reviews.llvm.org/D23500
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279078
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 15:44:44 +0000 (15:44 +0000)]
[InstCombine] use m_APInt to allow icmp (mul X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
https://reviews.llvm.org/rL278935
https://reviews.llvm.org/rL278945
https://reviews.llvm.org/rL279066
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279077
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 18 Aug 2016 15:27:25 +0000 (15:27 +0000)]
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp
This patch changes the code structure of
WebAssemblyLowerEmscriptenException pass to support both exception
handling and setjmp/longjmp. It also changes the name of the pass and
the source file.
1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions ->
WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both
EH and SjLj
2. List function / global variable names at the top so they
can be changed easily
3. Some cosmetic changes
Patch by Heejin Ahn
Differential Revision: https://reviews.llvm.org/D23588
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279075
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 18 Aug 2016 15:17:13 +0000 (15:17 +0000)]
[AArch64][GlobalISel] Select G_SDIV/G_UDIV.
There is no REM instruction; that will require an expansion.
It's not obvious that should be done in select, rather than as a
(custom?) legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279074
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 18 Aug 2016 15:17:01 +0000 (15:17 +0000)]
[GlobalISel] Add support for DIV/REM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279073
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 14:59:14 +0000 (14:59 +0000)]
[InstCombine] use APInt in isSignTest instead of ConstantInt; NFC
This will enable vector splat folding, but NFC until the callers
have their ConstantInt restrictions removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279072
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 18 Aug 2016 14:32:11 +0000 (14:32 +0000)]
llvm-readobj: handle import libraries with -coff-exports
`link -dump -exports` lists exported symbols from import libraries as well as
normal dlls. Ensure that we can handle import libraries as well in
llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279069
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 14:17:34 +0000 (14:17 +0000)]
fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279068
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 18 Aug 2016 14:12:34 +0000 (14:12 +0000)]
[Hexagon] Create vcombine in HexagonCopyToCombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279067
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Aug 2016 14:10:48 +0000 (14:10 +0000)]
[InstCombine] use m_APInt to allow icmp (xor X, Y), C folds for splat constant vectors
This is a sibling of:
https://reviews.llvm.org/rL278859
https://reviews.llvm.org/rL278935
https://reviews.llvm.org/rL278945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279066
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Aug 2016 13:41:26 +0000 (13:41 +0000)]
[X86][SSE] Add SSE1 tests to make sure we don't merge loads on illegal types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279065
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 18 Aug 2016 13:22:43 +0000 (13:22 +0000)]
[mips] Correct tail call encoding for MIPSR6
r277708 enabled tails calls for MIPS but used the 'jr' instruction when the
jump target was held in a register. For MIPSR6, 'jalr $zero, $reg' should
have been used. Additionally, add missing patterns for external and global
symbols for tail calls.
Reviewers: dsanders, vkalintiris
Differential Review: https://reviews.llvm.org/D23301
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 18 Aug 2016 13:22:37 +0000 (13:22 +0000)]
[Reassociate] Add test for PR28367.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279063
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 18 Aug 2016 13:08:58 +0000 (13:08 +0000)]
(Trivial) TargetPassConfig: assert when TargetMachine has no MCAsmInfo
Summary:
This is a pretty trivial, but I thought it was worth just checking that nobody feels it's completely the wrong thing to be doing.
The motivation is that when starting a new backend, you often start with a minimal stub, pretty much just FooTargetMachine and FooTargetInfo. Once that's built, you might naturally try `llc -march=foo myinput.ll` and it seems more developer-friendly if this ends up asserting due to the lack of MCAsmInfo with an informative message rather than just segfaulting.
Reviewers: MatzeB, chandlerc
Subscribers: bogner, llvm-commits
Differential Revision: https://reviews.llvm.org/D23443
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279061
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 18 Aug 2016 11:22:22 +0000 (11:22 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279054
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 18 Aug 2016 11:17:53 +0000 (11:17 +0000)]
Revert "ADT: Remove UB in ilist (and use a circular linked list)"
This reverts commit r278974 which broke some of our bots (e.g.
clang-cmake-aarch64-42vma, clang-cmake-aarch64-full).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279053
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 18 Aug 2016 11:17:47 +0000 (11:17 +0000)]
Revert "ADT: Tidy up ilist_traits static asserts, NFC"
This reverts commit r279012.
r278974 broke some bots, I have to revert this to get to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279052
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Thu, 18 Aug 2016 02:56:05 +0000 (02:56 +0000)]
[Docs] More MemorySSA doc updates!
Thanks again to Michael Kuperstein for the feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279032
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 18 Aug 2016 02:21:54 +0000 (02:21 +0000)]
Testcase for r279022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279031
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 18 Aug 2016 01:33:28 +0000 (01:33 +0000)]
Revert r279016 -- it breaks win32-elf JIT tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279029
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 18 Aug 2016 01:25:28 +0000 (01:25 +0000)]
[sanitizer-coverage/libFuzzer] instrument comparisons with __sanitizer_cov_trace_cmp[1248] instead of __sanitizer_cov_trace_cmp, don't pass the comparison type to save a bit performance. Use these new callbacks in libFuzzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279027
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 18 Aug 2016 01:18:15 +0000 (01:18 +0000)]
Fix bot failure due to new test
I had updated the output file name but not the corresponding nm based check
before submitting as r279023. This should fix the bot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279025
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 18 Aug 2016 01:08:50 +0000 (01:08 +0000)]
[ThinLTO] Keep common symbols in ThinLTO modules
Summary:
Skip the merging of common symbols for ThinLTO modules, they will be
merged by the final native object link. Trying to merge the symbols and
add to a combined module will incorrectly enable the common symbol to be
internalized in the ThinLTO module. Additionally, we will not want to
create a combined module for ThinLTO distributed builds.
This fixes failures in 7 cpu2006 benchmarks from the new LTO API in
ThinLTO mode.
Reviewers: mehdi_amini
Subscribers: pcc, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279023
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 18 Aug 2016 00:59:32 +0000 (00:59 +0000)]
TailDuplicator: Fix crash after r278974
Some inputs would after r278974 without this fix (see
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console
for an example)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279022
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 18 Aug 2016 00:59:24 +0000 (00:59 +0000)]
[LTO] Promote before performing weak resolution
Summary:
This was reversed compared to ThinLTOCodeGenerator for some reason,
and lead to an increased code-size on my tests. I figured that the
weak resolution may internalize a linkonce function, which will be
promoted immediately (and renamed), before being internalized again.
Reviewers: tejohnson
Subscribers: pcc, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279021
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 18 Aug 2016 00:56:58 +0000 (00:56 +0000)]
[asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Summary:
We are going to combine poisoning of red zones and scope poisoning.
PR27453
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D23623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279020
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 18 Aug 2016 00:22:34 +0000 (00:22 +0000)]
[RuntimeDyld] Strip leading '_' from symbols on 32-bit windows in
RTDyldMemoryManager::getSymbolAddressInProcess()
This should allow JIT'd code for win32 to find in-process symbols. See
http://llvm.org/PR28699 .
Patch by James Holderness. Thanks James!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279016
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 18 Aug 2016 00:12:33 +0000 (00:12 +0000)]
[LTO] Change addSaveTemps API: do not add dot to the supplied prefix path
Summary:
It does not play well with directories (end up with a bunch of hidden
files).
Also, do not strip the 0 suffix for the first task, especially since
0 can be used by ThinLTO as well now.
Reviewers: tejohnson
Subscribers: mehdi_amini, pcc, llvm-commits
Differential Revision: https://reviews.llvm.org/D23612
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279014
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 17 Aug 2016 23:47:56 +0000 (23:47 +0000)]
ADT: Tidy up ilist_traits static asserts, NFC
Change the ilist traits to use decltype instead of sizeof, and add
HasObsoleteCustomization so that additions to this list don't need to be
added in two places.
I suspect this will now work with MSVC, since the trait tested in
r278991 seems to work. If for some reason it continues to fail on
Windows I'll follow up by adding back the #ifndef _MSC_VER.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279012
91177308-0d34-0410-b5e6-
96231b3b80d8
Dominic Chen [Wed, 17 Aug 2016 23:42:27 +0000 (23:42 +0000)]
[WebAssembly] Handle debug information and virtual registers without crashing (reland r278967)
Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes.
Reviewers: jfb, aprantl, dschuff, echristo
Subscribers: llvm-commits, dschuff, jfb, MatzeB, dexonsmith, yurydelendik, mehdi_amini
Differential Revision: https://reviews.llvm.org/D23635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279011
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 17 Aug 2016 23:21:56 +0000 (23:21 +0000)]
[Docs] Update MemorySSA doc to address more feedback.
Primarily, this clarifies wording in a few places, and adds "\ "s to
make the formatting of things like "``Foo`` s" better.
Thanks to Michael Kuperstein for the comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279007
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 17 Aug 2016 23:09:57 +0000 (23:09 +0000)]
[libFuzzer] force proper popcnt instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279002
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 17 Aug 2016 23:01:03 +0000 (23:01 +0000)]
Make llvm-pdbdump print column info when available
llvm-pdbdump already had code to retrieve column information in the line tables, but it wasn't using it.
Most Microsoft PDBs don't seem to have column info, so this wasn't missed. But Clang includes column info by default (at least for now), and being able to see that is useful for ensuring we get the column info correct.
Differential Revision: https://reviews.llvm.org/D23629
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279001
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 17 Aug 2016 22:52:39 +0000 (22:52 +0000)]
Actually enable new test for const RangeAdapter. Missing from r278991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279000
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 17 Aug 2016 22:50:18 +0000 (22:50 +0000)]
SCEV: Don't assert about non-SCEV-able value in isSCEVExprNeverPoison() (PR28932)
Differential Revision: https://reviews.llvm.org/D23594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278999
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Wed, 17 Aug 2016 22:42:58 +0000 (22:42 +0000)]
[LoopUnroll] Move a simple check earlier. NFC.
Move the check of CallInst earlier to skip expensive recursive operations.
Differential Revision: https://reviews.llvm.org/D23611
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278998
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Wed, 17 Aug 2016 22:20:07 +0000 (22:20 +0000)]
[LV] Move LoopBodyTraits to a better place, and add comment for simplifying LoopBlocksTraversal. NFC.
Summary: I later (after r278573) found that LoopIterator.h has some overlapping with LoopBodyTraits. It's good to use LoopBodyTraits because a *Traits struct is algorithm independent.
Reviewers: anemet, nadav, mkuper
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D23529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278996
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Aug 2016 22:18:57 +0000 (22:18 +0000)]
[InstCombine] add test for missing vector icmp fold
Also, add a scalar test to demonstrate one of the intermediate folds that
is necessary to accomplish the existing, multi-step test. And simplify
the vector tests to only check the final piece of that multi-step transform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Aug 2016 22:17:03 +0000 (22:17 +0000)]
wordsmith the "new targets" section a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278994
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Wed, 17 Aug 2016 22:12:49 +0000 (22:12 +0000)]
[RegionIterator] clang-format some pieces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278992
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 17 Aug 2016 22:06:59 +0000 (22:06 +0000)]
Fix reverse to work on const rbegin()/rend().
Duncan found that reverse worked on mutable rbegin(), but the has_rbegin
trait didn't work with a const method. See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160815/382890.html
for more details.
Turns out this was already solved in clang with has_getDecl. Copied that and made it work for rbegin.
This includes the tests Duncan attached to that thread, including the traits test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278991
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 17 Aug 2016 21:50:54 +0000 (21:50 +0000)]
[libFuzzer] given 0 and 255 more preference when inserting repeated bytes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278986
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 17 Aug 2016 21:46:04 +0000 (21:46 +0000)]
[macho2yaml] Don't write empty linkedit data
Since I stopped writing empty export tries it causes LinkEdit to potentially be completely empty which results in invalid yaml being generated.
To prevent this we skip linkedit data if it is empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278985
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 17 Aug 2016 21:30:30 +0000 (21:30 +0000)]
[libFuzzer] one more mutation: ChangeBinaryInteger; also fix the breakage from r278970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278982
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 17 Aug 2016 21:07:35 +0000 (21:07 +0000)]
Tail Duplication: Accept explicit threshold for duplicating.
This will allow tail duplication and tail merging during layout to have a
shared threshold to make sure that they don't overlap. No observable change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278981
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 17 Aug 2016 21:07:33 +0000 (21:07 +0000)]
TailDuplicator: Use optForSize instead of hasFnAttribute.
This will cause minsize functions to have the same threshold as optsize
functions, but otherwise should have no effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278980
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 17 Aug 2016 20:45:23 +0000 (20:45 +0000)]
[libFuzzer] when printing the reproducer input, also print the base input and the mutation sequence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278975
91177308-0d34-0410-b5e6-
96231b3b80d8