148752 Commits

Author SHA1 Message Date
Craig Topper
da0638fc06 Fix spelling error in command line option description. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302311 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:31:11 +00:00
Eugene Zelenko
e5dc33d4f6 [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302310 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:30:37 +00:00
Easwaran Raman
66092ae0e8 Override invalidate of ProfileSummaryInfo to return false.
Differential revision: https://reviews.llvm.org/D32775

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302308 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:15:09 +00:00
Krzysztof Parzyszek
3804dab793 [Hexagon] Disable predicated calls by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302307 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:13:57 +00:00
Krzysztof Parzyszek
b5c0fee11c [Hexagon] Remove C6 and C7 as separate registers
These are M0 and M1. Removing duplicated registers reduces the number
of explicit register aliasing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:12:12 +00:00
Krzysztof Parzyszek
6d59bf7ade [RDF] Remove covered parts of reached uses for phi and use in same block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302305 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:10:32 +00:00
Matthias Braun
97beda0626 ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates
MaxCallFrameSize and calls it after instruction selection in the ARM
target.

This avoids
ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame()
giving different answers in early/late phases of codegen.

The testcase shows a particular nasty example result of that where we
would fail to properly align an alloca.

Differential Revision: https://reviews.llvm.org/D32622

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302303 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:04:05 +00:00
Zachary Turner
4a6f9ee16e [CodeView] Reserve TypeDatabase records up front.
Most of the time we know exactly how many type records we
have in a list, and we want to use the visitor to deserialize
them into actual records in a database.  Previously we were
just using push_back() every time without reserving the space
up front in the vector.  This is obviously terrible from a
performance standpoint, and it's not uncommon to have PDB
files with half a million type records, where the performance
degredation was quite noticeable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 22:02:37 +00:00
Matthias Braun
4463e11348 Add missing target triple to test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302301 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 21:50:26 +00:00
Zachary Turner
1ed19d1faa Fix -Wreorder warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302294 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 21:25:31 +00:00
Zachary Turner
ba512990af [StreamArray] Pipe the Offset through the constructor.
When randomly accessing an element by offset, we weren't passing
the offset through so if you called .offset() it would return a
value of 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302292 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 21:15:31 +00:00
Kannan Narayanan
96d48fac54 [AMDGPU] In the new waitcnt insertion pass, use getHeader
instead of getTopBlock to find the loop header.

Differential Revision: https://reviews.llvm.org/D32831



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302290 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 21:10:17 +00:00
Matthias Braun
0cb25a2a10 MIParser/MIRPrinter: Compute block successors if not explicitely specified
- MIParser: If the successor list is not specified successors will be
  added based on basic block operands in the block and possible
  fallthrough.

- MIRPrinter: Adds a new `simplify-mir` option, with that option set:
  Skip printing of block successor lists in cases where the
  parser is guaranteed to reconstruct it. This means we still print the
  list if some successor cannot be determined (happens for example for
  jump tables), if the successor order changes or branch probabilities
  being unequal.

Differential Revision: https://reviews.llvm.org/D31262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302289 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 21:09:30 +00:00
Simon Pilgrim
4468ee17b8 [X86] Use SDValue::getConstantOperandVal helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302286 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 20:53:52 +00:00
Matthias Braun
738a26c4e2 TargetLibraryInfo: Introduce wcslen
wcslen is part of the C99 and C++98 standards.

- This introduces the function to TargetLibraryInfo.
- Also set attributes for wcslen in llvm::inferLibFuncAttributes().

Differential Revision: https://reviews.llvm.org/D32837

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 20:25:50 +00:00
Konstantin Zhuravlyov
d2ff9194d6 AMDGPU/AMDHSA: Set COMPUTE_PGM_RSRC2:LDS_SIZE to 0
This field is populated by the CP

Differential Revision: https://reviews.llvm.org/D32619


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302277 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 20:13:55 +00:00
Reid Kleckner
9d64d17682 Simplify dbg.value handling in SDISel with early returns
No functional change other than improving dbgs logging accuracy on
constant dbg values. Previously we would add things like "i32 42" as
debug values, and then log that we were dropping the debug info, which
is silly.

Delete some dead code that was checking for static allocas. This
remained after r207165, but served no purpose. Currently, static alloca
dbg.values are always sent through the DanglingDebugInfoMap, and are
usually made valid the first time the alloca is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302267 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 18:30:34 +00:00
Sam Clegg
afe8111c69 [WebAssembly] Add ObjectYAML support for wasm name section
Differential Revision: https://reviews.llvm.org/D32841

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302266 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 18:12:34 +00:00
Alexei Starovoitov
0a1cb7297f [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
2017-05-05 18:05:00 +00:00
Joerg Sonnenberger
7b3685be8d 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
2017-05-05 17:57:45 +00:00
Joerg Sonnenberger
5096d8de03 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
2017-05-05 17:55:58 +00:00
Craig Topper
ace8b39f82 [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
2017-05-05 17:36:09 +00:00
Adrian McCarthy
dca600b49c 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
2017-05-05 17:14:00 +00:00
Craig Topper
a76abe9fb9 [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
2017-05-05 17:09:29 +00:00
Zachary Turner
6a4e43bdd4 [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
2017-05-05 17:00:04 +00:00
Amaury Sechet
91c57a1252 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
2017-05-05 16:27:55 +00:00
Sanjay Patel
d439e709a9 [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
2017-05-05 16:24:58 +00:00
George Rimar
f93836e0ec [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
2017-05-05 16:13:10 +00:00
Sanjay Patel
5eef1b5eb5 [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
2017-05-05 16:12:05 +00:00
Nuno Lopes
1febb5cbbd fix build on Cygwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302246 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 16:08:22 +00:00
Jun Bum Lim
dec99cb68b [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
2017-05-05 16:05:41 +00:00
Simon Pilgrim
776b058abe [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
2017-05-05 15:36:31 +00:00
Aditya Kumar
978eb7c50b [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
2017-05-05 14:49:45 +00:00
Simon Pilgrim
4df50595db [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
2017-05-05 13:31:52 +00:00
Simon Pilgrim
ded2272aa5 [X86] Remove duplicate operation actions. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302230 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 12:34:55 +00:00
Simon Pilgrim
35e2a9f4e3 [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
2017-05-05 12:20:34 +00:00
Krzysztof Parzyszek
3da6edb996 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
2017-05-05 12:20:07 +00:00
Simon Pilgrim
bc2001774d Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-05 11:55:38 +00:00
John Brawn
69798f0bc0 [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
2017-05-05 11:31:25 +00:00
Simon Pilgrim
09fdcb4e32 [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
2017-05-05 10:59:24 +00:00
George Rimar
a83f092580 [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
2017-05-05 10:52:39 +00:00
Andrew Ng
eb74f788ec [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
2017-05-05 09:21:35 +00:00
Martin Storsjo
ae5b79d34f [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
2017-05-05 08:40:24 +00:00
Daniel Jasper
13790c8735 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
2017-05-05 07:31:40 +00:00
Dehao Chen
c6a0731aa0 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
2017-05-05 00:47:34 +00:00
Zachary Turner
8038a28b4b [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
2017-05-05 00:19:57 +00:00
Zachary Turner
6bf4f87547 [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
2017-05-04 23:53:54 +00:00
Zachary Turner
505c76a926 [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
2017-05-04 23:53:29 +00:00
Zachary Turner
b18693c52d [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
2017-05-04 23:53:01 +00:00
Evgeniy Stepanov
1565077013 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
2017-05-04 23:29:39 +00:00