OSDN Git Service
Sanjay Patel [Wed, 15 Jun 2016 21:22:15 +0000 (21:22 +0000)]
[x86, SSE] update packed FP compare tests for direct translation from builtin to IR
The clang side of this was r272840:
http://reviews.llvm.org/rL272840
A follow-up step would be to auto-upgrade and remove these LLVM intrinsics completely.
Differential Revision: http://reviews.llvm.org/D21269
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 15 Jun 2016 21:14:02 +0000 (21:14 +0000)]
Address a few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272838
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 15 Jun 2016 21:14:01 +0000 (21:14 +0000)]
Fix llvm-objdump when disassembling a stripped Mach-O binary with the -macho option.
It was printing out nothing in this case.
llvm-objdump tries to disassemble sections a symbol at a time. In the case of a
fully stripped Mach-O executable the only symbol remaining in the (__TEXT,__text)
section is the special linker defined symbol __mh_execute_header . This
symbol is special in that while it is N_SECT symbol in the (__TEXT,__text)
its address is before the start of the (__TEXT,__text). It’s address is the
start of the __TEXT segment which is where the mach header is statically
linked. So the code in DisassembleMachO() needs to deal with this case specially.
rdar://
26778273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272837
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 15 Jun 2016 21:05:04 +0000 (21:05 +0000)]
[Hexagon] Fix/simplify some conditional statements
Fix for PR28138.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272836
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 20:52:19 +0000 (20:52 +0000)]
[X86]: Fix for uninitialized access introduced in r272797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272835
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 20:51:47 +0000 (20:51 +0000)]
[x86] delete unnecessary function declarations
Missed this in r272806, r272807.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272834
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 15 Jun 2016 20:43:41 +0000 (20:43 +0000)]
[CFLAA] Ignore non-pointers, move Attrs to graph nodes.
This patch makes CFLAA ignore non-pointer values, since we can now
sanely do that with the escaping/unknown attributes. Additionally,
StratifiedAttrs make more sense to sit on nodes than edges (since
they're properties of values, and ultimately end up on the nodes of
StratifiedSets). So, this patch puts said attributes on nodes.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272833
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 15 Jun 2016 20:33:36 +0000 (20:33 +0000)]
AArch64: stop trying to use 32-bit MOVZs when expanding patchpoints.
Of course the assembly was right but because the opcode was MOVZWi it was
encoded as "movz w16, #65535, lsl #32" which is an unallocated encoding and
would go horribly wrong on a CPU.
No idea how this bug survived this long. It seems nobody is using that aspect
of patchpoints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272831
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 20:32:42 +0000 (20:32 +0000)]
Axe some trailing whitespace from my last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272830
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 20:30:34 +0000 (20:30 +0000)]
[codeview] Move deserialization methods out of line
They aren't performance critical and don't need to be inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272829
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 20:26:58 +0000 (20:26 +0000)]
[x86] add folds for x86 vector compare nodes (PR27924)
Ideally, we can get rid of most x86 LLVM intrinsics by transforming them to IR (and some of that happened
with http://reviews.llvm.org/rL272807), but it doesn't cost much to have some simple folds in the backend
too while we're working on that and as a backstop.
This fixes:
https://llvm.org/bugs/show_bug.cgi?id=27924
Differential Revision: http://reviews.llvm.org/D21356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272828
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 15 Jun 2016 20:19:16 +0000 (20:19 +0000)]
Statistic: Add machine parseable json output
- We lacked a short unique identifier for a statistics, so I renamed the
current "Name" field that just contained the DEBUG_TYPE name of the
current file to DebugType and added a new "Name" field that contains
the C++ identifier of the statistic variable.
- Add the -stats-json option which outputs statistics in json format.
Differential Revision: http://reviews.llvm.org/D20995
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272826
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 15 Jun 2016 18:51:25 +0000 (18:51 +0000)]
[LoopSimplify] Analyses do not need to be member variables.
In preparation for porting this pass to the new PM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272818
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Jun 2016 18:48:35 +0000 (18:48 +0000)]
[codeview] Use ArrayRef instead of a non-const vector reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272817
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Jun 2016 18:26:59 +0000 (18:26 +0000)]
[pdbdump] Verify LF_{CLASS,ENUM,INTERFACE,STRUCTURE,UNION} records.
Differential Revision: http://reviews.llvm.org/D21361
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272815
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 18:18:05 +0000 (18:18 +0000)]
[X86]: Updated r272801 to promote 16 bit compares with immediate operand
to 32 bits. This is in response to a comment by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272814
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 18:00:01 +0000 (18:00 +0000)]
[CodeView] Add support for emitting S_UDT for typedefs
Emit a S_UDT record for typedefs. We still need to do something for
class types.
Differential Revision: http://reviews.llvm.org/D21149
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272813
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 15 Jun 2016 17:50:39 +0000 (17:50 +0000)]
Add support for string attributes in the C API.
Summary: As per title. This completes the C API Attribute support.
Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272811
91177308-0d34-0410-b5e6-
96231b3b80d8
Pankaj Gode [Wed, 15 Jun 2016 17:24:52 +0000 (17:24 +0000)]
Test commit after access grant. Modified comment by adding a period.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272808
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 17:17:27 +0000 (17:17 +0000)]
[x86, SSE] remove the GCCBuiltins from the integer min/max intrinsics
This allows us to emit native IR in Clang (next commit).
Also, update the intrinsic tests to show that codegen already knows how to handle
the IR that Clang will soon produce.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272806
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Jun 2016 17:12:29 +0000 (17:12 +0000)]
[x86] fix function name; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272805
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 16:47:23 +0000 (16:47 +0000)]
[TargetLibraryInfo] Teach isValidProtoForLibFunc about tan
We would fail to validate the type of the tan function which would cause
downstream users of isValidProtoForLibFunc to assert.
This fixes PR28143.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272802
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 16:37:46 +0000 (16:37 +0000)]
[X86]: Quit promoting 8 and 16 bit compares to 32 bit.
Differential Revision: http://reviews.llvm.org/D21144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272801
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 15 Jun 2016 16:08:50 +0000 (16:08 +0000)]
Revert "Preserve DebugInfo when replacing values in DAGCombiner"
Reverting due to assertion failure in
lib/CodeGen/SelectionDAG/InstrEmitter.cpp
This reverts commit r272792.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272799
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin B. Smith [Wed, 15 Jun 2016 16:03:06 +0000 (16:03 +0000)]
[X86]: Improve Liveness checking for X86FixupBWInsts.cpp
Differential Revision: http://reviews.llvm.org/D21085
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272797
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 15:49:46 +0000 (15:49 +0000)]
[LV] Add getter function for LoopVectorizationLegality::Strides. NFC
This should help moving Strides to LAA later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272796
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Wed, 15 Jun 2016 15:30:07 +0000 (15:30 +0000)]
[mips] Eliminate unused code for addrRegReg complex pattern. NFC.
Reviewers: dsanders, sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21381
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272794
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 15 Jun 2016 15:27:53 +0000 (15:27 +0000)]
Add llvm_unreachable to silence a "not all control paths" false positive warning from MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272793
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 15 Jun 2016 14:50:08 +0000 (14:50 +0000)]
Preserve DebugInfo when replacing values in DAGCombiner
[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.
Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.
This refixes PR9817 which was being incompletely checked in the
testsuite.
Reviewers: jyknight
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D21037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272792
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Wed, 15 Jun 2016 14:23:29 +0000 (14:23 +0000)]
Reverting r272778 because there's an assertion
failure when running the test CodeGen/ARM/intrinsics-coprocessor.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272791
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Jun 2016 14:06:28 +0000 (14:06 +0000)]
[AVX512] Remove the GCCBuiltins from the mask pcmpeq/pcmpgt intrinsics so we can emit native IR from clang.
The intrinsics themselves can be removed in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272786
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Wed, 15 Jun 2016 13:55:09 +0000 (13:55 +0000)]
[AMDGPU] Fix few coding style issues. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272785
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 15 Jun 2016 13:49:58 +0000 (13:49 +0000)]
[mips] Missing test case
Add missing testcase from r272666.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272784
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 12:26:15 +0000 (12:26 +0000)]
[LV] Remove more unused functions. NFC
LoopVectorizationLegality::strides_begin/end are also unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272781
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Jun 2016 12:26:11 +0000 (12:26 +0000)]
[LV] Remove unused function. NFC
LoopVectorizationLegality::mustCheckStrides is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272780
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Wed, 15 Jun 2016 11:32:24 +0000 (11:32 +0000)]
[ARM] Add support for mrrc/mrrc2 intrinsics.
Differential Revision: http://reviews.llvm.org/D21178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272778
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 10:51:40 +0000 (10:51 +0000)]
Work around MSVC "friend" semantics.
The error on clang-x86-win2008-selfhost is:
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(955) : error C2248: 'llvm::slpvectorizer::BoUpSLP::ScheduleData' : cannot access private struct declared in class 'llvm::slpvectorizer::BoUpSLP'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(608) : see declaration of 'llvm::slpvectorizer::BoUpSLP::ScheduleData'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(337) : see declaration of 'llvm::slpvectorizer::BoUpSLP'
I reproduced this locally with both MSVC 2013 and MSVC 2015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272772
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 10:36:16 +0000 (10:36 +0000)]
[mips] Replace AdditionalRequires<[IsGP64bit]> with GPR_64. NFC.
Summary: Also fixed one case where HasMips64 was being used instead of IsGP64bit.
Reviewers: sdardis
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: http://reviews.llvm.org/D21028
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272771
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Wed, 15 Jun 2016 10:32:00 +0000 (10:32 +0000)]
Use FPasses in opt exactly when it is initialized.
Previously, there was a discrepancy between the population of function
passes in FPasses, and their invocation. Function passes specified on
the command line, after an optimizaton level was simply discared. This
fix PR27509.
Patch by Jesper Antonsson.
Differential Review: http://reviews.llvm.org/D20725
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272770
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 09:47:27 +0000 (09:47 +0000)]
[mips] Removed invalid test from o32_cc.ll
MIPS32R1 cannot implement a 64-bit FPU because this was introduced in MIPS32R2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272769
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 09:44:22 +0000 (09:44 +0000)]
[mips] clang-format Mips16ISelDAGToDAG.{cpp,h}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272768
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 09:00:33 +0000 (09:00 +0000)]
Speculative buildbot fix.
This wasn't failing for me with clang as the compiler. I think GCC may
disagree with clang about whether a friend declaration introduces a
declaration in the enclosing namespace (or something).
Example error:
/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:950:77: error: ‘llvm::raw_ostream& llvm::slpvectorizer::operator<<(llvm::raw_ostream&, const llvm::slpvectorizer::BoUpSLP::ScheduleData&)’ should have been declared inside ‘llvm::slpvectorizer’
const BoUpSLP::ScheduleData &SD) {
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272767
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 08:43:40 +0000 (08:43 +0000)]
[PM] Port SLPVectorizer to the new PM
This uses the "runImpl" approach to share code with the old PM.
Porting to the new PM meant abandoning the anonymous namespace enclosing
most of SLPVectorizer.cpp which is a bit of a bummer (but not a big deal
compared to having to pull the pass class into a header which the new PM
requires since it calls the constructor directly).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272766
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Jun 2016 08:43:23 +0000 (08:43 +0000)]
[mips][msa] Fix register/register-class mismatches in emitINSERT_DF_VIDX().
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272765
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Wed, 15 Jun 2016 07:46:24 +0000 (07:46 +0000)]
[mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions
Differential Revision: http://reviews.llvm.org/D16719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272764
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 15 Jun 2016 07:30:38 +0000 (07:30 +0000)]
[AVX512] Fix BLENDM lowering patterns. Operands should be swapped to match SELECT behavior.
Use BLENDM instead of masked move instruction.
Differential Revision: http://reviews.llvm.org/D21001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272763
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 07:27:04 +0000 (07:27 +0000)]
Push a dependent computation into the assert that uses it; NFC
... instead of explicitly conditioning on NDEBUG. Also use an easier to
read conditional expression.
(Addresses post-commit review from David Blaikie.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272762
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 15 Jun 2016 07:13:05 +0000 (07:13 +0000)]
AMDGPU: Fix MUBUF offset bugs affecting llvm.amdgcn.buffer.* intrinsics
Summary:
This fixes two related bugs. First, the generic optimization passes
unfortunately generate negative constant offsets but the hardware treats
SOffset as an unsigned value.
Second, there is a hardware bug on SI and CI, where address clamping in MUBUF
instructions does not work correctly when SOffset is larger than the buffer
size. This patch works around this bug by never using SOffset.
An alternative workaround would be to do the clamping manually when SOffset
is too large, but generating the required code sequence during instruction
selection would be rather involved, and in any case the resulting code would
probably be worse.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96360
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21326
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272761
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:59 +0000 (06:53 +0000)]
Fix unused variable warning; NFC
TailCallReturnAddrDelta is used only in an assert, so put it under
defined(NDEBUG).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272760
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:55 +0000 (06:53 +0000)]
[SCEV] Use dyn_cast<T> instead of dyn_cast<const T>; NFC
The const is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272759
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 06:53:51 +0000 (06:53 +0000)]
[SCEV] Use cast<> instead of dyn_cast; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272758
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 15 Jun 2016 06:18:01 +0000 (06:18 +0000)]
[PM] Port AlignmentFromAssumptions to the new PM.
This uses the "runImpl" pattern to share code between the old and new PM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272757
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 05:35:14 +0000 (05:35 +0000)]
Don't force SP-relative addressing for statepoints
Summary:
... when the offset is not statically known.
Prioritize addresses relative to the stack pointer in the stackmap, but
fallback gracefully to other modes of addressing if the offset to the
stack pointer is not a known constant.
Patch by Oscar Blumberg!
Reviewers: sanjoy
Subscribers: llvm-commits, majnemer, rnk, sanjoy, thanm
Differential Revision: http://reviews.llvm.org/D21259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272756
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Wed, 15 Jun 2016 05:14:29 +0000 (05:14 +0000)]
Add support for callsite in the new C API for attributes
Summary: The second consumer of attributes.
Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272754
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 04:37:50 +0000 (04:37 +0000)]
[SCEV] clang-format some sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272753
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 15 Jun 2016 04:37:47 +0000 (04:37 +0000)]
[SCEV] Change the interface for SolveQuadraticEquation; NFC
Use Optional<T> to denote the absence of a solution, not
SCEVCouldNotCompute. This makes the usage of SolveQuadraticEquation
somewhat simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272752
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 15 Jun 2016 03:09:39 +0000 (03:09 +0000)]
AMDGPU/SI: Correctly encode constant expressions
Summary:
We we have an MCConstantExpr, we can encode it directly into the instruction
instead of emitting fixups.
Reviewers: artem.tamazov, vpykhtin, SamWot, nhaustov, arsenm
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21236
Change-Id: I88b3edf288d48e65c5d705fc4850d281f8e36948
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272750
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 15 Jun 2016 03:03:30 +0000 (03:03 +0000)]
[MBP] add comments and bug fix
Document the new parameter and threshod computation
model. Also fix a bug when the threshold parameter
is set to be different from the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272749
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 15 Jun 2016 02:54:14 +0000 (02:54 +0000)]
AMDGPU/AsmParser: Add support for parsing symbol operands
Summary:
We can now reference symbols directly in operands, like this:
s_mov_b32 s0, global
Reviewers: artem.tamazov, vpykhtin, SamWot, nhaustov
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21038
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272748
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Wed, 15 Jun 2016 01:40:02 +0000 (01:40 +0000)]
[LibFuzzer] Fix ``FuzzerMutate.ShuffleBytes2`` unit test on OSX.
The ``FuzzerMutate.ShuffleBytes2`` unit test was failing on
OSX due to the implementation of ``std::random_shuffle()``
being different between libcxx and libstdc++.
@kcc has decided (see http://reviews.llvm.org/D21218) it is acceptable
for there to be different mutation behavior on different platforms so
this commit just adjusts the test to perform the minimum number of
iterations (that is a power of 2) to see all the mutations the unit test
is looking for.
Differential Revision: http://reviews.llvm.org/D21359
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272743
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 15 Jun 2016 00:35:26 +0000 (00:35 +0000)]
Recommit [LV] Enable vectorization of loops where the IV has an external use
r272715 broke libcxx because it did not correctly handle cases where the
last iteration of one IV is the second-to-last iteration of another.
Original commit message:
Vectorizing loops with "escaping" IVs has been disabled since r190790, due to
PR17179. This re-enables it, with support for external use of both
"post-increment" (last iteration) and "pre-increment" (second-to-last iteration)
IVs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272742
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 15 Jun 2016 00:25:09 +0000 (00:25 +0000)]
Make DetectDeadLanes preserve CFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272740
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 00:19:56 +0000 (00:19 +0000)]
[LoopUnroll] Don't crash trying to unroll loop with EH pad exit
We do not support splitting cleanuppad or catchswitches. This is
problematic for passes which assume that a loop is in loop simplify
form (the loop would have a dedicated exit block instead of sharing it).
While it isn't great that we don't support this for cleanups, we still
cannot make loop-simplify form an assertable precondition because
indirectbr will also disable these sorts of CFG cleanups.
This fixes PR28132.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272739
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 00:19:52 +0000 (00:19 +0000)]
[CodeView] Don't emit debuginfo for imported symbols
Emitting symbol information requires us to have a definition for the
symbol. A symbol reference is insufficient.
This fixes PR28123.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272738
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 15 Jun 2016 00:19:09 +0000 (00:19 +0000)]
Remove the ScalarReplAggregates pass
Nearly all the changes to this pass have been done while maintaining and
updating other parts of LLVM. LLVM has had another pass, SROA, which
has superseded ScalarReplAggregates for quite some time.
Differential Revision: http://reviews.llvm.org/D21316
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272737
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 15 Jun 2016 00:11:01 +0000 (00:11 +0000)]
AMDGPU: Run pointer optimization passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272736
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 14 Jun 2016 23:13:15 +0000 (23:13 +0000)]
Verifier: check that functions have at most a single !prof attachment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272734
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Tue, 14 Jun 2016 23:05:46 +0000 (23:05 +0000)]
Fix a test case to match its intention
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272733
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 14 Jun 2016 22:30:50 +0000 (22:30 +0000)]
Remove unused import. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272731
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 14 Jun 2016 22:30:41 +0000 (22:30 +0000)]
Reverting r272715 since it broke libcxx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272730
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Tue, 14 Jun 2016 22:27:17 +0000 (22:27 +0000)]
Set machine block placement hot prob threshold for both static and runtime profile.
Summary: With runtime profile, we have more confidence in branch probability, thus during basic block layout, we set a lower hot prob threshold so that blocks can be layouted optimally.
Reviewers: djasper, davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20991
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272729
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 14 Jun 2016 22:25:07 +0000 (22:25 +0000)]
[pdbdump] Verify TPI hash for LF_ENUM type records.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272728
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 14 Jun 2016 22:23:29 +0000 (22:23 +0000)]
Fix list of deprecated C API attribute functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272727
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Tue, 14 Jun 2016 22:09:00 +0000 (22:09 +0000)]
Revert "Enable libFuzzer's afl_driver to append stderr to a file."
Crashes with AddressSanitizer: SEGV on unknown address
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/9924/steps/annotate/logs/stdio
This reverts commit r272706.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272726
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 14 Jun 2016 22:04:16 +0000 (22:04 +0000)]
Rename AttributeSetImpl::NumAttrs and AttributeSetImpl::getNumAttributes to reflect that they work on slots rather than attributes. NFC
Summary: The current naming not only doesn't convey the meaning of what this does, but worse, it convey the wrong meaning. This was a major source of confusion understanding the code, so I'm applying the boy scout rule here and making it better after I leave.
Reviewers: void, bkramer, whitequark
Differential Revision: http://reviews.llvm.org/D21264
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272725
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 14 Jun 2016 21:44:19 +0000 (21:44 +0000)]
[PM] Port WholeProgramDevirt to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272721
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 14 Jun 2016 21:27:27 +0000 (21:27 +0000)]
[LV] Enable vectorization of loops where the IV has an external use
Vectorizing loops with "escaping" IVs has been disabled since r190790, due to
PR17179. This re-enables it, with support for external use of both
"post-increment" (last iteration) and "pre-increment" (second-to-last iteration)
IVs.
Differential Revision: http://reviews.llvm.org/D21048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272715
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 14 Jun 2016 21:25:46 +0000 (21:25 +0000)]
[x86] add current codegen tests for PR27924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272714
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Tue, 14 Jun 2016 21:24:13 +0000 (21:24 +0000)]
Add a missing test.
This is a test for r272421: Disable MSan-hostile loop unswitching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272713
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 14 Jun 2016 21:19:40 +0000 (21:19 +0000)]
[MemorySSA] Set CFGOnly correctly for MemorySSAWrapperPass
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D21344
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272712
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 14 Jun 2016 21:01:22 +0000 (21:01 +0000)]
IR: Introduce local_unnamed_addr attribute.
If a local_unnamed_addr attribute is attached to a global, the address
is known to be insignificant within the module. It is distinct from the
existing unnamed_addr attribute in that it only describes a local property
of the module rather than a global property of the symbol.
This attribute is intended to be used by the code generator and LTO to allow
the linker to decide whether the global needs to be in the symbol table. It is
possible to exclude a global from the symbol table if three things are true:
- This attribute is present on every instance of the global (which means that
the normal rule that the global must have a unique address can be broken without
being observable by the program by performing comparisons against the global's
address)
- The global has linkonce_odr linkage (which means that each linkage unit must have
its own copy of the global if it requires one, and the copy in each linkage unit
must be the same)
- It is a constant or a function (which means that the program cannot observe that
the unique-address rule has been broken by writing to the global)
Although this attribute could in principle be computed from the module
contents, LTO clients (i.e. linkers) will normally need to be able to compute
this property as part of symbol resolution, and it would be inefficient to
materialize every module just to compute it.
See:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160509/356401.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160516/356738.html
for earlier discussion.
Part of the fix for PR27553.
Differential Revision: http://reviews.llvm.org/D20348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272709
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 14 Jun 2016 20:48:36 +0000 (20:48 +0000)]
Resubmit "[pdb] Actually write a PDB to disk from YAML.""
Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272708
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Tue, 14 Jun 2016 20:42:05 +0000 (20:42 +0000)]
Enable libFuzzer's afl_driver to append stderr to a file.
Summary:
[libFuzzer] Enable afl_driver to append stderr to a user specified file.
Append stderr of afl_driver to the file specified by the environmental variable
AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs
on crashes without rerunning crashing test cases (which won't work for crashes
that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz
and users would have no way of seeing it.
Reviewers: llvm-commits, aizatsky, kcc, vitalybuka
Subscribers: vitalybuka
Differential Revision: http://reviews.llvm.org/D21194
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272706
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 14 Jun 2016 20:29:59 +0000 (20:29 +0000)]
AMDGPU/SI: Refactor fixup handling for constant addrspace variables
Summary:
We now use a standard fixup type applying the pc-relative address of
constant address space variables, and we have the GlobalAddress lowering
code add the required 4 byte offset to the global address rather than
doing it as part of the fixup.
This refactoring will make it easier to use the same code for global
address space variables and also simplifies the code.
Re-commit this after fixing a bug where we were trying to use a
reference to a Triple object that had already been destroyed.
Reviewers: arsenm, kzhuravl
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: http://reviews.llvm.org/D21154
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272705
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 14 Jun 2016 20:27:35 +0000 (20:27 +0000)]
Make sure attribute kind and attributes are named respectively Kind and Attr consistently. Historically they used to be the same the terminology is very confused in the codebase. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272704
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 14 Jun 2016 20:23:16 +0000 (20:23 +0000)]
[ValueTracking] Calls to @llvm.assume always return
This change teaches llvm::isGuaranteedToTransferExecutionToSuccessor
that calls to @llvm.assume always terminate. Most other relevant
intrinsics should be covered by the "CS.onlyReadsMemory() ||
CS.onlyAccessesArgMemory()" bit but we were missing @llvm.assumes
because we state that it clobbers memory.
Added an LICM test case, but this change is not specific to LICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272703
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 14 Jun 2016 19:40:10 +0000 (19:40 +0000)]
[TailDuplication] Split up NumInstrDups statistic.
Summary:
Split NumInstrDups statistic into separate added/removed counts to avoid
negative stat being printed as unsigned.
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D21335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272700
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 14 Jun 2016 19:15:13 +0000 (19:15 +0000)]
[LibFuzzer] Disable the ``fuzzer-trace-pc.test`` test on non-linux platforms.
On OSX this test sometimes fails due to the
``LLVMFuzzer-FullCoverageSetTest-TracePC`` program going over the
default 2GiB memory limit. This shouldn't be happening and needs
investigating. For now just disable the test so we can set up an
OSX buildbot.
Differential Revision: http://reviews.llvm.org/D21319
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272696
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Tue, 14 Jun 2016 18:53:20 +0000 (18:53 +0000)]
[X86] Reduce the width of multiplification when its operands are extended from i8 or i16
For <N x i32> type mul, pmuludq will be used for targets without SSE41, which
often introduces many extra pack and unpack instructions in vectorized loop
body because pmuludq generates <N/2 x i64> type value. However when the operands
of <N x i32> mul are extended from smaller size values like i8 and i16, the type
of mul may be shrunk to use pmullw + pmulhw/pmulhuw instead of pmuludq, which
generates better code. For targets with SSE41, pmulld is supported so no
shrinking is needed.
Differential Revision: http://reviews.llvm.org/D20931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272694
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 14 Jun 2016 18:51:35 +0000 (18:51 +0000)]
Revert "[pdb] Actually write a PDB to disk from YAML."
This reverts commit
879139e1c6577b09df52de56a6bab856a19ed185.
This was committed accidentally when I blindly typed git svn
dcommit instead of the command to generate a patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272693
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 14 Jun 2016 18:49:36 +0000 (18:49 +0000)]
[pdb] Actually write a PDB to disk from YAML.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272692
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 14 Jun 2016 18:12:28 +0000 (18:12 +0000)]
[CFLAA] Tag arguments as escaped instead of unknown.
This patch also includes some refactoring.
Prior to this patch, we tagged all CFLAA attributes as unknown. This is
suboptimal, since it meant that any Value used as an argument would be
considered to alias any other Value that existed.
Now that we have the machinery to tag sets below the set for an
arbitrary value with attributes, it's okay to be less conservative with
arguments. (Specifically, we still tag the set under an argument with
unknown).
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21262
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272690
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 14 Jun 2016 18:02:27 +0000 (18:02 +0000)]
[CFLAA] Refactor graph-building code. NFC.
This patch refactors CFLAA's graph building code. This makes keeping
track of common state (TargetLibraryInfo, ...) easier.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21261
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272688
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Tue, 14 Jun 2016 17:20:29 +0000 (17:20 +0000)]
[docs] Update AMDGPU relocation information
- Added new notation for specifying relocation calculation
- Renamed:
- R_AMDGPU_32_LOW -> R_AMDGPU_ABS32_LO
- R_AMDGPU_32_HIGH -> R_AMDGPU_ABS32_HI
- R_AMDGPU_64 -> R_AMDGPU_ABS64
- Added:
- R_AMDGPU_REL32
- R_AMDGPU_REL64
- R_AMDGPU_ABS32
- Updated calculations for relative relocations
Differential Revision: http://reviews.llvm.org/D21215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272684
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 14 Jun 2016 16:42:05 +0000 (16:42 +0000)]
[FileCheck] Document --check-prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272683
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 14 Jun 2016 16:05:12 +0000 (16:05 +0000)]
Fix some typos in the Kaleidoscope tutorial (PR28120)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272681
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 14 Jun 2016 15:16:35 +0000 (15:16 +0000)]
Revert "AMDGPU/SI: Refactor fixup handling for constant addrspace variables"
This reverts commit r272675.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272677
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 14 Jun 2016 15:11:01 +0000 (15:11 +0000)]
AMDGPU/SI: Refactor fixup handling for constant addrspace variables
Summary:
We now use a standard fixup type applying the pc-relative address of
constant address space variables, and we have the GlobalAddress lowering
code add the required 4 byte offset to the global address rather than
doing it as part of the fixup.
This refactoring will make it easier to use the same code for global
address space variables and also simplifies the code.
Reviewers: arsenm, kzhuravl
Subscribers: arsenm, kzhuravl, llvm-commits
Differential Revision: http://reviews.llvm.org/D21154
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272675
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Tue, 14 Jun 2016 15:09:30 +0000 (15:09 +0000)]
Fix BSS global handling in AsmPrinter
Change EmitGlobalVariable to check final assembler section is in BSS
before using .lcomm/.comm directive. This prevents globals from being
put into .bss erroneously when -data-sections is used.
This fixes PR26570.
Reviewers: echristo, rafael
Subscribers: llvm-commits, mehdi_amini
Differential Revision: http://reviews.llvm.org/D21146
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272674
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Tue, 14 Jun 2016 15:03:59 +0000 (15:03 +0000)]
[AMDGPU][llvm-mc] Predefined symbols to access -mcpu from the assembly source (.option.machine_version...)
The feature allows for conditional assembly etc.
TODO: make those symbols read-only.
Test added.
Differential Revision: http://reviews.llvm.org/D21238
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272673
91177308-0d34-0410-b5e6-
96231b3b80d8