OSDN Git Service
Alexei Starovoitov [Fri, 5 May 2017 18:05:00 +0000 (18:05 +0000)]
[bpf] fix a bug which causes incorrect big endian reloc fixup
o Add bpfeb support in BPF dwarfdump unit test case
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302265
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 5 May 2017 17:57:45 +0000 (17:57 +0000)]
Add NetBSD to the list of platforms supporting death tests. Two unit
tests require this for compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302264
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 5 May 2017 17:55:58 +0000 (17:55 +0000)]
If posix_fallocate returns EOPNOTSUPP, fallback to ftruncate.
This can happen at least on NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302263
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 5 May 2017 17:36:09 +0000 (17:36 +0000)]
[KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits.
This adds routines for reseting KnownBits to unknown, making the value all zeros or all ones. It also adds methods for querying if the value is zero, all ones or unknown.
Differential Revision: https://reviews.llvm.org/D32637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302262
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Fri, 5 May 2017 17:14:00 +0000 (17:14 +0000)]
Allow operator-> to work from a FixedStreamArrayIterator.
This is similar to my recent fix for VarStreamArrayIterator, but the cause
(and thus the fix) is subtley different. The FixedStreamArrayIterator
iterates over a const Array, so the iterator's value type must be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302257
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 5 May 2017 17:09:29 +0000 (17:09 +0000)]
[Float2Int] Replace a ConstantRange copy with a move. Remove an extra call to MapVector::find.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302256
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 5 May 2017 17:00:04 +0000 (17:00 +0000)]
[ADT] Add BitVector::find_prev.
This almost completes the matrix of all possible find
functions.
*EXISTING*
----------
find_first
find_first_unset
find_next
find_next_unset
find_last
find_last_unset
*NEW*
----
find_prev
*STILL MISSING*
---------------
find_prev_unset
Differential Revision: https://reviews.llvm.org/D32885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302254
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Fri, 5 May 2017 16:27:55 +0000 (16:27 +0000)]
Add more variations of addcarry in the tests. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302252
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 5 May 2017 16:24:58 +0000 (16:24 +0000)]
[InstSimplify] fix copy-paste mistake in test comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302251
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Fri, 5 May 2017 16:13:10 +0000 (16:13 +0000)]
[llvm-dwarfdump] - Add comment for maybeDecompress(). NFC.
Addresses post commit review comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302249
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 5 May 2017 16:12:05 +0000 (16:12 +0000)]
[InstSimplify] add tests for (icmp X, C1 | icmp X, C2); NFC
These are the 'or' counterparts for the tests added with r300493.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302248
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 5 May 2017 16:08:22 +0000 (16:08 +0000)]
fix build on Cygwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302246
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 5 May 2017 16:05:41 +0000 (16:05 +0000)]
[AArch64] Remove AArch64AddressTypePromotion pass
Summary:
Remove the AArch64AddressTypePromotion pass as we migrated all transformations
done in this pass into CGP in r299379.
Reviewers: qcolombet, jmolloy, javed.absar, mcrosier
Reviewed By: qcolombet
Subscribers: aemerson, rengolin, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D31623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302245
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 15:36:31 +0000 (15:36 +0000)]
[X86][SSE] Add 128/256/512 bit vector build vector from register tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302243
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Kumar [Fri, 5 May 2017 14:49:45 +0000 (14:49 +0000)]
[LoopIdiom] check for safety while expanding
Loop Idiom recognition was generating memset in a case that
would result generating a division operation to an unsafe location.
Differential Revision: https://reviews.llvm.org/D32674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302238
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 13:31:52 +0000 (13:31 +0000)]
[X86][AVX512] Improve support and testing for CTLZ of 512-bit vectors without CDI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302233
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 12:34:55 +0000 (12:34 +0000)]
[X86] Remove duplicate operation actions. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302230
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 12:20:34 +0000 (12:20 +0000)]
[X86][AVX512CDI] Move v2i64/v4i64 and v4i32/v8i32 VPLZCNT lowering to tablegen
Extend NoVLX targets to use the 512-bit versions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302229
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 5 May 2017 12:20:07 +0000 (12:20 +0000)]
Remove stale live-ins in the branch folder
Hoisting common code can cause registers that live-in in the successor
blocks to no longer be live-in. The live-in information needs to be
updated to reflect this, or otherwise incorrect code can be generated
later on.
Differential Revision: https://reviews.llvm.org/D32661
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302228
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 11:55:38 +0000 (11:55 +0000)]
Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302226
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Fri, 5 May 2017 11:31:25 +0000 (11:31 +0000)]
[ARM] Add support for ORR and ORN instruction substitutions
Recently support was added for substituting one intruction for another by
negating or inverting the immediate, but ORR and ORN were missed so this patch
adds them.
This one is slightly different to the others in that ORN only exists in thumb,
so we only do the substitution in thumb.
Differential Revision: https://reviews.llvm.org/D32534
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302224
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 5 May 2017 10:59:24 +0000 (10:59 +0000)]
[X86][AVX] Add LowerIntUnary helpers to split unary vector ops in half. NFCI.
Same as LowerIntArith helpers but for unary ops instead of binary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302222
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Fri, 5 May 2017 10:52:39 +0000 (10:52 +0000)]
[llvm-dwarfdump] - Print an error message if section decompression failed.
llvm-dwarfdump currently prints no message if decompression fails
for some reason. I noticed that during work on one of LLD patches
where LLD produced an broken output. It was a bit confusing to see
no output for section dumped and no any error message at all.
Patch adds error message for such cases.
Differential revision: https://reviews.llvm.org/D32865
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302221
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Ng [Fri, 5 May 2017 09:21:35 +0000 (09:21 +0000)]
[X86] Remove unused code from X86 optimize LEAs. NFC.
This patch removes unused code which is no longer required because of changes
to the DIExpression::prepend function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302219
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Fri, 5 May 2017 08:40:24 +0000 (08:40 +0000)]
[ArgPromotion] Add a testcase for PR32917
Differential Revision: https://reviews.llvm.org/D32882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302216
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 5 May 2017 07:31:40 +0000 (07:31 +0000)]
Initialize new member X86Operand::FrontendSize in all codepaths.
This fixes MSAN-builds after r302179.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302214
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Fri, 5 May 2017 00:47:34 +0000 (00:47 +0000)]
Update VP prof metadata during inlining.
Summary: r298270 added profile update logic for branch_weights. This patch implements profile update logic for VP prof metadata too.
Reviewers: eraman, tejohnson, davidxl
Reviewed By: eraman
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302209
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 5 May 2017 00:19:57 +0000 (00:19 +0000)]
[ADT] A few minor improvements to BitVector
Fixes some spelling mistakes, uses a helper function, and
adds an additional test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302208
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 4 May 2017 23:53:54 +0000 (23:53 +0000)]
[pdb] Don't verify TPI hash values up front.
Verifying the hash values as we are currently doing
results in iterating every type record before the user
even tries to access the first one, and the API user
has no control over, or ability to hook into this
process.
As a result, when the user wants to iterate over types
to print them or index them, this results in a second
iteration over the same list of types. When there's
upwards of 1,000,000 type records, this is obviously
quite undesirable.
This patch raises the verification outside of TpiStream
, and llvm-pdbdump hooks a hash verification visitor
into the normal dumping process. So we still verify
the hash records, but we can do it while not requiring
a second iteration over the type stream.
Differential Revision: https://reviews.llvm.org/D32873
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302206
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 4 May 2017 23:53:29 +0000 (23:53 +0000)]
[PDB] Don't build the entire source file list up front.
I tried to run llvm-pdbdump on a very large (~1.5GB) PDB to
try and identify show-stopping performance problems. This
patch addresses the first such problem.
When loading the DBI stream, before anyone has even tried to
access a single record, we build an in memory map of every
source file for every module. In the particular PDB I was
using, this was over 85 million files. Specifically, the
complexity is O(m*n) where m is the number of modules and
n is the average number of source files (including headers)
per module.
The whole reason for doing this was so that we could have
constant time access to any module and any of its source
file lists. However, we can still get O(1) access to the
source file list for a given module with a simple O(m)
precomputation, and access to the list of modules is
already O(1) anyway.
So this patches reduces the O(m*n) up-front precomputation
to an O(m) one, where n is ~6,500 and n*m is about 85 million
in my pathological test case.
Differential Revision: https://reviews.llvm.org/D32870
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302205
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 4 May 2017 23:53:01 +0000 (23:53 +0000)]
[llvm-pdbdump] Only build the TypeDatabase if necessary.
Building the type database is expensive, and can take multiple
minutes for large PDBs. But we only need it in certain cases
depending on what command line options are specified. So only
build it when we know we're about to need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302204
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 4 May 2017 23:29:39 +0000 (23:29 +0000)]
Remap metadata attached to global variables.
Fix for PR32577.
Global variables may have !associated metadata, which includes a reference to another global. It needs remapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302203
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 4 May 2017 22:43:08 +0000 (22:43 +0000)]
[RegisterBankInfo] Fix 80-col introduced in r293506.
NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302202
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 4 May 2017 22:43:04 +0000 (22:43 +0000)]
[GlobalISel] Add missing doxygen keyword for doxygen groups.
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302201
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Olsak [Thu, 4 May 2017 22:25:20 +0000 (22:25 +0000)]
AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5
Reviewers: arsenm, nhaehnle
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D32645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302200
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Thu, 4 May 2017 22:00:42 +0000 (22:00 +0000)]
[GISel]:Skip legalizing Intermediate inst(with generic types)
During legalization, targets can create Pseudo Instructions with
generic types. We shouldn't try to legalize them.
Reviewed by Quentin, dsanders
https://reviews.llvm.org/D32575
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302199
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 21:45:49 +0000 (21:45 +0000)]
[JumpThreading] When processing compares, explicitly check that the result type is not a vector rather than check for it being an integer.
Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302198
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 21:45:45 +0000 (21:45 +0000)]
[JumpThreading] Change a dyn_cast that is already protected by an isa check to a static cast. Combine the with another static cast. NFC
Differential Revision: https://reviews.llvm.org/D32874
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302197
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Thu, 4 May 2017 21:43:12 +0000 (21:43 +0000)]
[GISel]: Add support to translate ConstantVectors
Reviewed by Quentin
https://reviews.llvm.org/D32814
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302196
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 21:29:50 +0000 (21:29 +0000)]
[ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of its methods construct new ConstantRange objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302194
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 21:29:45 +0000 (21:29 +0000)]
[Float2Int] Remove return of ConstantRange from seen method. Nothing uses it so it just creates and discards a ConstantRange object for no reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302193
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 20:55:16 +0000 (20:55 +0000)]
Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302192
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 4 May 2017 19:51:34 +0000 (19:51 +0000)]
[InstSimplify] add folds for or-of-casted-icmps
The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200.
This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260.
The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that
case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps'
that already exists for 'and-of-icmps'.
I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove
code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some
duplicated folds because patterns are not matched in a general way.
Differential Revision: https://reviews.llvm.org/D32876
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302189
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 4 May 2017 19:32:43 +0000 (19:32 +0000)]
[WebAssembly] Add wasm symbol table support to llvm-objdump
Differential Revision: https://reviews.llvm.org/D32760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302185
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 4 May 2017 19:14:54 +0000 (19:14 +0000)]
[PPC] When restoring R30 (PIC base pointer), mark it as <def>
This happened on the PPC32/SVR4 path and was discovered when building
FreeBSD on PPC32. It was a typo-class error in the frame lowering code.
This fixes PR26519.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302183
91177308-0d34-0410-b5e6-
96231b3b80d8
Greg Clayton [Thu, 4 May 2017 18:29:44 +0000 (18:29 +0000)]
Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302180
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 4 May 2017 18:19:52 +0000 (18:19 +0000)]
[ms-inline-asm] Use the frontend size only for ambiguous instructions
This avoids problems on code like this:
char buf[16];
__asm {
movups xmm0, [buf]
mov [buf], eax
}
The frontend size in this case (1) is wrong, and the register makes the
instruction matching unambiguous. There are also enough bytes available
that we shouldn't complain to the user that they are potentially using
an incorrectly sized instruction to access the variable.
Supersedes D32636 and D26586 and fixes PR28266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302179
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 4 May 2017 18:19:17 +0000 (18:19 +0000)]
[InstSimplify] move logic-of-icmps helper functions; NFC
Putting these next to each other should make it easier to see
what's missing from each side. Patch to plug one of those holes
should be posted soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302178
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 4 May 2017 18:03:25 +0000 (18:03 +0000)]
Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
with a fix for the clang backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302176
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Thu, 4 May 2017 17:42:34 +0000 (17:42 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302175
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 4 May 2017 17:36:53 +0000 (17:36 +0000)]
[InstSimplify] add tests for or-of-casted-icmps; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302174
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 4 May 2017 17:26:15 +0000 (17:26 +0000)]
[NewGVN] Remove unneeded newline and format assertions. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302173
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 17:00:41 +0000 (17:00 +0000)]
[APInt] Reduce number of allocations involved in multiplying. Reduce worst case multiply size
Currently multiply is implemented in operator*=. Operator* makes a copy and uses operator*= to modify the copy.
Operator*= itself allocates a temporary buffer to hold the multiply result as it computes it. Then copies it to the buffer in *this.
Operator*= attempts to bound the size of the result based on the number of active bits in its inputs. It also has a couple special cases to handle 0 inputs without any memory allocations or multiply operations. The best case is that it calculates a single word regardless of input bit width. The worst case is that it calculates the a 2x input width result and drop the upper bits.
Since operator* uses operator*= it incurs two allocations, one for a copy of *this and one for the temporary allocation. Neither of these allocations are kept after the method operation is done.
The main usage in the backend appears to be ConstantRange::multiply which uses operator* rather than operator*=.
This patch moves the multiply operation to operator* and implements operator*= using it. This avoids the copy in operator*. operator* now allocates a result buffer sized the same width as its inputs no matter what. This buffer will be used as the buffer for the returned APInt. Finally, we reuse tcMultiply to implement the multiply operation. This function is capable of not calculating additional upper words that will be discarded.
This change does lose the special optimizations for the inputs using less words than their size implies. But it also removed the getActiveBits calls from all multiplies. If we think those optimizations are important we could look at providing additional bounds to tcMultiply to limit the computations.
Differential Revision: https://reviews.llvm.org/D32830
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302171
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Thu, 4 May 2017 16:58:45 +0000 (16:58 +0000)]
[PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline.
Differential revision: https://reviews.llvm.org/D32768
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302170
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Thu, 4 May 2017 16:50:37 +0000 (16:50 +0000)]
[Lexicon] Add BDCE
Summary: Add an entry to the Lexicon for "BDCE."
Reviewers: jmolloy, hfinkel
Reviewed By: jmolloy
Differential Revision: https://reviews.llvm.org/D31861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302169
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 4 May 2017 16:26:07 +0000 (16:26 +0000)]
Add accidentally deleted testcase back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302167
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 4 May 2017 16:24:31 +0000 (16:24 +0000)]
Cleanup tests to not share a DISubprogram between multiple Functions.
rdar://problem/
31926379
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302166
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 4 May 2017 16:21:30 +0000 (16:21 +0000)]
[test-release] Status update *before* long gzip
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302165
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 May 2017 14:24:50 +0000 (14:24 +0000)]
[globalisel][tablegen] Add several GINodeEquiv's for operators that do not require additional support.
Summary:
As of this patch, 350 out of 3938 rules are currently imported.
Depends on D32229
Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar
Reviewed By: ab
Subscribers: dberris, llvm-commits, igorb
Differential Revision: https://reviews.llvm.org/D32275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302154
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 4 May 2017 14:14:44 +0000 (14:14 +0000)]
[DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).
Differential Revision: http://reviews.llvm.org/D32596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302153
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:42:57 +0000 (13:42 +0000)]
[X86][AVX512] Fix VPABSD file checks
Fix capitalization and string matching
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302150
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:35:40 +0000 (13:35 +0000)]
[X86][SSE] Add i686 triple tests for partial vector and re-association
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302149
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 4 May 2017 13:35:17 +0000 (13:35 +0000)]
Refactoring with range-based for, NFC
Patch by Wei-Ren Chen.
Differential Revision: https://reviews.llvm.org/D32682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302148
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Thu, 4 May 2017 13:33:30 +0000 (13:33 +0000)]
[SystemZ] Make copyPhysReg() add impl-use operands of super reg.
When a 128 bit COPY is lowered into two instructions, an impl-use operand of
the super-reg should be added to each new instruction in case one of the
sub-regs is undefined.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302146
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:08:09 +0000 (13:08 +0000)]
[X86][SSE] Add i686 triple tests for PBLENDW commutation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302145
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 May 2017 13:00:30 +0000 (13:00 +0000)]
[X86][AVX1] Regenerate checks and add i686 triple tests for folded logical ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302144
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Liu [Thu, 4 May 2017 11:49:39 +0000 (11:49 +0000)]
Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.
Contacted the auther in the original commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302140
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 4 May 2017 11:03:50 +0000 (11:03 +0000)]
[mips][XRay] Use the base version of emitXRayTable
Follow up rL290858 by removing the MIPS specific version of XRayTable
emission in favour of the basic version.
This resolves a buildbot failure where the ELF sections were malformed
causing the linker to reject the object files with xray related sections.
Reviewers: dberris, slthakur
Differential Revision: https://reviews.llvm.org/D32808
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302138
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 4 May 2017 10:54:35 +0000 (10:54 +0000)]
[ArgPromotion] Fix a truncated variable
This fixes a regression since SVN rev 273808 (which was supposed to
not change functionality).
The regression caused miscompilations (noted in the wild when targeting
AArch64) on platforms with 32 bit long.
Differential Revision: https://reviews.llvm.org/D32850
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302137
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Thu, 4 May 2017 10:37:00 +0000 (10:37 +0000)]
[LLVM][inline-asm][Altmacor] Altmacro string delimiter '<..>'
In this patch, I introduce a new altmacro string delimiter.
This review is the second review in a series of four reviews.
(one for each altmacro feature: LOCAL, string delimiter, string '!' escape sign and absolute expression as a string '%' ).
In the alternate macro mode, you can delimit strings with matching angle brackets <..>
when using it as a part of calling macro arguments.
As described in the https://sourceware.org/binutils/docs-2.27/as/Altmacro.html
"<string>
You can delimit strings with matching angle brackets."
assumptions:
1. If an argument begins with '<' and ends with '>'. The argument is considered as a string.
2. Except adding new string mark '<..>', a regular macro behavior is expected.
3. The altmacro cannot affect the regular less/greater behavior.
4. If a comma is present inside an angle brackets it considered as a character and not as a separator.
Differential Revision: https://reviews.llvm.org/D32701
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302135
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 07:34:58 +0000 (07:34 +0000)]
[X86][AVX-512] Allow EVEX encoded instruction selection when available for mul v8i32.
Differential Revision: https://reviews.llvm.org/D32679
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302127
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 4 May 2017 07:31:28 +0000 (07:31 +0000)]
[ARM] ACLE Chapter 9 intrinsics
Added the integer data processing intrinsics from ACLE v2.1 Chapter 9
but I have missed out the saturation_occurred intrinsics for now. For
the instructions that read and write the GE bits, a chain is included
and the only instruction that reads these flags (sel) is only
selectable via the implemented intrinsic.
Differential Revision: https://reviews.llvm.org/D32281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302126
91177308-0d34-0410-b5e6-
96231b3b80d8
Oren Ben Simhon [Thu, 4 May 2017 07:22:49 +0000 (07:22 +0000)]
[X86] Disabling PLT in Regcall CC Functions
According to psABI, PLT stub clobbers XMM8-XMM15.
In Regcall calling convention those registers are used for passing parameters.
Thus we need to prevent lazy binding in Regcall.
Differential Revision: https://reviews.llvm.org/D32430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302124
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 06:53:31 +0000 (06:53 +0000)]
[AVX-512VL] Autogenerate checks. Add --show-mc-encoding to check instruction predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302123
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Thu, 4 May 2017 06:24:52 +0000 (06:24 +0000)]
[AVX] Fix vpcmpeqq predicate.
Summary:
Fix vpcmpeqq predicate. AVX512 version of vpcmpeqq is not equivalent to AVX one.
Split from https://reviews.llvm.org/D32679
Reviewers: craig.topper, zvi, aymanmus
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32786
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302119
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Thu, 4 May 2017 05:31:56 +0000 (05:31 +0000)]
Use right function in LoopVectorize.
- unsigned AS = getMemInstAlignment(I);
+ unsigned AS = getMemInstAddressSpace(I);
Review: Hal Finkel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302114
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 04:55:46 +0000 (04:55 +0000)]
[XRay] Use wordsize-dependent alignment for index
This makes it simpler for the runtime to consistently handle the entries
in the function sled index in both 32 and 64 bit platforms where the
XRay runtime works.
Follow-up on D32693.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302111
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 4 May 2017 04:33:27 +0000 (04:33 +0000)]
[SelectionDAG] Improve known bits support for CTPOP.
This is based on the same concept from ValueTracking's version of computeKnownBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302110
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 03:37:57 +0000 (03:37 +0000)]
[XRay] Create an Index of sleds per function
Summary:
This change adds a new section to the xray-instrumented binary that
stores an index into ranges of the instrumentation map, where sleds
associated with the same function can be accessed as an array. At
runtime, we can get access to this index by function ID offset allowing
for selective patching and unpatching by function ID.
Each entry in this new section (xray_fn_idx) will include two pointers
indicating the start and one past the end of the sleds associated with
the same function. These entries will be 16 bytes long on x86 and
aarch64. On arm, we align to 16 bytes anyway so the runtime has to take
that into consideration.
__{start,stop}_xray_fn_idx will be the symbols that the runtime will
look for when we implement the selective patching/unpatching by function
id APIs. Because XRay synthesizes the function id's in a monotonically
increasing manner at runtime now, implementations (and users) can use
this table to look up the sleds associated with a specific function.
This is useful in implementations that want to do things like:
- Implement coverage mode for functions by patching everything
pre-main, then as functions are encountered, the installed handler
can unpatch the function that's been encountered after recording
that it's been called.
- Do "learning mode", so that the implementation can figure out some
statistical information about function calls by function id for a
time being, and then determine which functions are worth
uninstrumenting at runtime.
- Do "selective instrumentation" where an implementation can
specifically instrument only certain function id's at runtime
(either based on some external data, or through some other
heuristics) instead of patching all the instrumented functions at
runtime.
Reviewers: dblaikie, echristo, chandlerc, javed.absar
Subscribers: pelikan, aemerson, kpw, llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D32693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302109
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 4 May 2017 03:36:16 +0000 (03:36 +0000)]
IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI.
When profiling a no-op incremental link of Chromium I found that the functions
computeImportForFunction and computeDeadSymbols were consuming roughly 10% of
the profile. The goal of this change is to improve the performance of those
functions by changing the map lookups that they were previously doing into
pointer dereferences.
This is achieved by changing the ValueInfo data structure to be a pointer to
an element of the global value map owned by ModuleSummaryIndex, and changing
reference lists in the GlobalValueSummary to hold ValueInfos instead of GUIDs.
This means that a ValueInfo will take a client directly to the summary list
for a given GUID.
Differential Revision: https://reviews.llvm.org/D32471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302108
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 4 May 2017 02:01:18 +0000 (02:01 +0000)]
llvm/IR/Function.h: Prune an obsolete @param in r302060. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302106
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Thu, 4 May 2017 01:24:26 +0000 (01:24 +0000)]
[XRay] Detect loops in functions being lowered
Summary:
This is an implementation of the loop detection logic that XRay needs to
determine whether a function might take time at runtime. Without this
heuristic, XRay will tend to not instrument short functions that have
loops that might have runtime dependent on inputs or external values.
While this implementation doesn't do any further analysis than just
figuring out whether there is a loop in the MachineFunction being
code-gen'ed, we're paving the way for being able to perform more
sophisticated analysis of the function in the future (for example to
determine whether the trip count for the loop might be constant, and
make a decision on that instead). This enables us to cover more
functions with the default heuristics, and potentially identify ones
that have variable runtime latency just by looking for the presence of
loops.
Reviewers: chandlerc, rnk, pelikan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302103
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zolotukhin [Wed, 3 May 2017 23:53:38 +0000 (23:53 +0000)]
[SCEV] createAddRecFromPHI: Optimize for the most common case.
Summary:
The existing implementation creates a symbolic SCEV expression every
time we analyze a phi node and then has to remove it, when the analysis
is finished. This is very expensive, and in most of the cases it's also
unnecessary. According to the data I collected, ~60-70% of analyzed phi
nodes (measured on SPEC) have the following form:
PN = phi(Start, OP(Self, Constant))
Handling such cases separately significantly speeds this up.
Reviewers: sanjoy, pete
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302096
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 May 2017 23:32:51 +0000 (23:32 +0000)]
strlen-1.ll: Fix test
Change test for `strlen(x) == 0 --> *x == 0` to actually test the
pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302094
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 23:22:46 +0000 (23:22 +0000)]
[InstCombine][KnownBits] Use KnownBits better to detect nsw adds
Change checkRippleForAdd from a heuristic to a full check -
if it is provable that the add does not overflow return true, otherwise false.
Patch by Yoav Ben-Shalom
Differential Revision: https://reviews.llvm.org/D32686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302093
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 3 May 2017 23:13:42 +0000 (23:13 +0000)]
Mark functions as not having CFI once we finalize an x86 stack frame
We'll set it back to true in emitPrologue if it gets called. It doesn't
get called for naked functions.
Fixes PR32912
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302092
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 23:12:29 +0000 (23:12 +0000)]
[KnownBits] Add methods for determining if KnownBits is a constant value
This patch adds isConstant and getConstant for determining if KnownBits represents a constant value and to retrieve the value. Use them to simplify code.
Differential Revision: https://reviews.llvm.org/D32785
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302091
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 22:25:19 +0000 (22:25 +0000)]
[ValueTracking] Remove handling for BitWidth being 0 in ComputeSignBit and isKnownNonZero.
I don't believe its possible to have non-zero values here since DataLayout became required. The APInt constructor inside of the KnownBits object will assert if this ever happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302089
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 3 May 2017 22:07:25 +0000 (22:07 +0000)]
[KnownBits] Add zext, sext, and trunc methods to KnownBits
This patch adds zext, sext, and trunc methods to KnownBits and uses them where possible.
Differential Revision: https://reviews.llvm.org/D32784
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302088
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 May 2017 21:55:34 +0000 (21:55 +0000)]
[TargetLowering] use isSubsetOf in SimplifyDemandedBits; NFCI
This is the DAG equivalent of https://reviews.llvm.org/D32255 ,
which will hopefully be committed again. The functionality
(preferring a 'not' op) is already here in the DAG, so this is
just intended to be a clean-up and performance improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302087
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Wed, 3 May 2017 21:53:21 +0000 (21:53 +0000)]
clang-format and restyle DWARFFormValue before working on it. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302086
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 3 May 2017 21:39:01 +0000 (21:39 +0000)]
DebugInfo: elide type index entries for synthetic types
Compiler emitted synthetic types may not have an associated DIFile
(translation unit). In such a case, when generating CodeView debug type
information, we would attempt to compute an absolute filepath which
would result in a segfault due to a NULL DIFile*. If there is no source
file associated with the type, elide the type index entry for the type
and record the type information. This actually results in higher
fidelity debug information than clang/C2 as of this writing.
Resolves PR32668!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302085
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:51:34 +0000 (20:51 +0000)]
[AArch64] Fix variable name ambiguity in r302078.
ArchKind is passed to the function, but it's also a type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302081
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Wed, 3 May 2017 20:37:07 +0000 (20:37 +0000)]
[TailCallElim] Remove an unused argument. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302080
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:33:58 +0000 (20:33 +0000)]
[AArch64] Make the TargetParser add CPU exts provided by the arch.
Otherwise, each CPU has to manually specify the extensions it supports,
even though they have to be a superset of the base arch extensions.
And when there's redundant data there's stale data, so most of the CPUs
lie about the features they support (almost none lists AEK_FP).
Instead, do the saner thing: add the optional extensions on top of the
base extensions provided by the architecture.
The ARM TargetParser has the same behavior.
Differential Revision: https://reviews.llvm.org/D32780
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302078
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 3 May 2017 20:33:52 +0000 (20:33 +0000)]
[AArch64] armv8-A doesn't have CRC.
That's only a required extension as of v8.1a.
Remove it from the "generic" CPU as well: it should only support the
base ISA (and binutils agrees).
Also unify the MC tests into crc.s and arm64-crc32.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302077
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Wed, 3 May 2017 20:31:19 +0000 (20:31 +0000)]
[libFuzzer] exit without running atexit handlers in libfuzzer's crash handler
Summary:
It's not safe to assume that atexit handlers can be run once the app crashed.
Patch by Jochen Eisinger.
Reviewers: kcc, vitalybuka
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32640
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302076
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 3 May 2017 20:10:36 +0000 (20:10 +0000)]
[Hexagon] Use automatically-generated scheduling information for HVX
Patch by Jyotsna Verma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302073
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 3 May 2017 19:42:06 +0000 (19:42 +0000)]
Remove unused private field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302069
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 3 May 2017 19:25:04 +0000 (19:25 +0000)]
Avoid warning of unused variable in release builds. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302068
91177308-0d34-0410-b5e6-
96231b3b80d8