1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

148605 Commits

Author SHA1 Message Date
Simon Pilgrim
a125ccfde1 [X86] Reduce code for setting operations actions by merging into loops across multiple types/ops. NFCI.
llvm-svn: 302357
2017-05-06 18:17:56 +00:00
Simon Pilgrim
05c4646203 [NVPTX] Add support for ISD::ABS lowering
Use the ISD::ABS opcode directly

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

llvm-svn: 302356
2017-05-06 17:42:09 +00:00
Simon Pilgrim
2d8e2fa524 [X86][SSE] Break register dependencies on v16i8/v8i16 BUILD_VECTOR on SSE41
rL294581 broke unnecessary register dependencies on partial v16i8/v8i16 BUILD_VECTORs, but on SSE41 we (currently) use insertion for full BUILD_VECTORs as well. By allowing full insertion to occur on SSE41 targets we can break register dependencies here as well.

llvm-svn: 302355
2017-05-06 17:30:39 +00:00
Brian Gesiak
cac3cd7be1 [Analysis] Print out unreachable loops
Summary:
When writing a loop pass I made a mistake and hit the assertion
"Unreachable block in loop". Later, I hit an assertion when I called
`BasicBlock::eraseFromParent()` incorrectly: "Use still stuck around
after Def is destroyed". This latter assertion, however, printed out
exactly which value is being deleted and what uses remain, which helped
me debug the issue.

To help people debugging their loop passes in the future, print out
exactly which basic block is unreachable in a loop.

Reviewers: sanjoy, hfinkel, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: mzolotukhin

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

llvm-svn: 302354
2017-05-06 16:22:53 +00:00
Simon Pilgrim
12866b2f4e [X86][AVX2] Add scheduling latency/throughput tests for some AVX2 instructions
Many more to come...

llvm-svn: 302338
2017-05-06 13:46:09 +00:00
Simon Pilgrim
63ed21483f [DAGCombiner] If ISD::ABS is legal/custom, use it directly instead of canonicalizing first.
Remove an extra canonicalization step if ISD::ABS is going to be used anyway.

Updated x86 abs combine to check that we are lowering from both canonicalizations.

llvm-svn: 302337
2017-05-06 13:44:42 +00:00
Craig Topper
1433390382 [SCEV] Remove extra APInt copies from getRangeForAffineARHelper.
This changes one parameter to be a const APInt& since we only read from it. Use std::move on local APInts once they are no longer needed so we can reuse their allocations. Lastly, use operator+=(uint64_t) instead of adding 1 to an APInt twice creating a new APInt each time.

llvm-svn: 302335
2017-05-06 06:03:07 +00:00
Craig Topper
3364e88e41 [SCEV] Use std::move to avoid some APInt copies.
llvm-svn: 302334
2017-05-06 05:22:56 +00:00
Craig Topper
f682419d39 [SCEV] Use APInt's uint64_t operations instead of creating a temporary APInt to hold 1.
llvm-svn: 302333
2017-05-06 05:15:11 +00:00
Craig Topper
d98a504b8c [SCEV] Avoid a couple APInt copies by capturing by reference since the method returns a reference.
llvm-svn: 302332
2017-05-06 05:15:09 +00:00
Craig Topper
76afb39c1b [LazyValueInfo] Avoid unnecessary copies of ConstantRanges
Summary:
ConstantRange contains two APInts which can allocate memory if their width is larger than 64-bits. So we shouldn't copy it when we can avoid it.

This changes LVILatticeVal::getConstantRange() to return its internal ConstantRange by reference. This allows many places that just need a ConstantRange reference to avoid making a copy.

Several places now capture the return value of getConstantRange() by reference so they can call methods on it that don't need a new object.

Lastly it adds std::move in one place to capture to move a local ConstantRange into an LVILatticeVal.

Reviewers: reames, dberlin, sanjoy, anna

Reviewed By: reames

Subscribers: grandinj, llvm-commits

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

llvm-svn: 302331
2017-05-06 03:35:15 +00:00
Kamil Rytarowski
26872b2fe6 Note addition of NetBSD support in googletest
Recreated patch for __NetBSD__ has been pushed upstream to Google.

llvm-svn: 302329
2017-05-06 02:45:42 +00:00
Kostya Serebryany
5c1bead8ef [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a hidden -mllvm flag. llvm part.
llvm-svn: 302319
2017-05-05 23:14:40 +00:00
Quentin Colombet
3f7c3f8303 [RegisterBankInfo] Uniquely allocate instruction mapping.
This is a step toward having statically allocated instruciton mapping.
We are going to tablegen them eventually, so let us reflect that in
the API.

NFC.

llvm-svn: 302316
2017-05-05 22:48:22 +00:00
Craig Topper
04b33967e9 [BitVector] Improve the description of the BitVector::clear to say it removes the bits rather than clearing since clearing could be interpreted as just zeroing. NFC
llvm-svn: 302315
2017-05-05 22:46:40 +00:00
Craig Topper
c59a6a440e Fix spelling error in command line option description. NFC
llvm-svn: 302311
2017-05-05 22:31:11 +00:00
Eugene Zelenko
4f4f839212 [IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
llvm-svn: 302310
2017-05-05 22:30:37 +00:00
Easwaran Raman
d8f326053b Override invalidate of ProfileSummaryInfo to return false.
Differential revision: https://reviews.llvm.org/D32775

llvm-svn: 302308
2017-05-05 22:15:09 +00:00
Krzysztof Parzyszek
9d8cf79ebe [Hexagon] Disable predicated calls by default
llvm-svn: 302307
2017-05-05 22:13:57 +00:00
Krzysztof Parzyszek
dd2ec2e770 [Hexagon] Remove C6 and C7 as separate registers
These are M0 and M1. Removing duplicated registers reduces the number
of explicit register aliasing.

llvm-svn: 302306
2017-05-05 22:12:12 +00:00
Krzysztof Parzyszek
78ea532dc4 [RDF] Remove covered parts of reached uses for phi and use in same block
llvm-svn: 302305
2017-05-05 22:10:32 +00:00
Matthias Braun
25eaa3c70d 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

llvm-svn: 302303
2017-05-05 22:04:05 +00:00
Zachary Turner
f46b72f64d [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.

llvm-svn: 302302
2017-05-05 22:02:37 +00:00
Matthias Braun
375bc60bf3 Add missing target triple to test
llvm-svn: 302301
2017-05-05 21:50:26 +00:00
Zachary Turner
94e2b75280 Fix -Wreorder warning.
llvm-svn: 302294
2017-05-05 21:25:31 +00:00
Zachary Turner
dc2635c4aa [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.

llvm-svn: 302292
2017-05-05 21:15:31 +00:00
Kannan Narayanan
e4592ed923 [AMDGPU] In the new waitcnt insertion pass, use getHeader
instead of getTopBlock to find the loop header.

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

llvm-svn: 302290
2017-05-05 21:10:17 +00:00
Matthias Braun
46d58287e3 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

llvm-svn: 302289
2017-05-05 21:09:30 +00:00
Simon Pilgrim
75650b93d4 [X86] Use SDValue::getConstantOperandVal helper. NFCI.
llvm-svn: 302286
2017-05-05 20:53:52 +00:00
Matthias Braun
85c90275ff 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

llvm-svn: 302278
2017-05-05 20:25:50 +00:00
Konstantin Zhuravlyov
5ce6b9a574 AMDGPU/AMDHSA: Set COMPUTE_PGM_RSRC2:LDS_SIZE to 0
This field is populated by the CP

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

llvm-svn: 302277
2017-05-05 20:13:55 +00:00
Reid Kleckner
62db4e4d5a 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.

llvm-svn: 302267
2017-05-05 18:30:34 +00:00
Sam Clegg
b4cdc9d559 [WebAssembly] Add ObjectYAML support for wasm name section
Differential Revision: https://reviews.llvm.org/D32841

llvm-svn: 302266
2017-05-05 18:12:34 +00:00
Alexei Starovoitov
87cb47ef1f [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>
llvm-svn: 302265
2017-05-05 18:05:00 +00:00
Joerg Sonnenberger
537650fe97 Add NetBSD to the list of platforms supporting death tests. Two unit
tests require this for compilation.

llvm-svn: 302264
2017-05-05 17:57:45 +00:00
Joerg Sonnenberger
8d6ef4a498 If posix_fallocate returns EOPNOTSUPP, fallback to ftruncate.
This can happen at least on NetBSD.

llvm-svn: 302263
2017-05-05 17:55:58 +00:00
Craig Topper
df687cf030 [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

llvm-svn: 302262
2017-05-05 17:36:09 +00:00
Adrian McCarthy
60836fb552 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.

llvm-svn: 302257
2017-05-05 17:14:00 +00:00
Craig Topper
13dacdd58f [Float2Int] Replace a ConstantRange copy with a move. Remove an extra call to MapVector::find.
llvm-svn: 302256
2017-05-05 17:09:29 +00:00
Zachary Turner
c5bb012416 [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

llvm-svn: 302254
2017-05-05 17:00:04 +00:00
Amaury Sechet
ce6690015f Add more variations of addcarry in the tests. NFC.
llvm-svn: 302252
2017-05-05 16:27:55 +00:00
Sanjay Patel
a986f28f97 [InstSimplify] fix copy-paste mistake in test comments; NFC
llvm-svn: 302251
2017-05-05 16:24:58 +00:00
George Rimar
e53a9f8dbf [llvm-dwarfdump] - Add comment for maybeDecompress(). NFC.
Addresses post commit review comment.

llvm-svn: 302249
2017-05-05 16:13:10 +00:00
Sanjay Patel
cf9350eecd [InstSimplify] add tests for (icmp X, C1 | icmp X, C2); NFC
These are the 'or' counterparts for the tests added with r300493.

llvm-svn: 302248
2017-05-05 16:12:05 +00:00
Nuno Lopes
8164ea6060 fix build on Cygwin
llvm-svn: 302246
2017-05-05 16:08:22 +00:00
Jun Bum Lim
064892a65a [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

llvm-svn: 302245
2017-05-05 16:05:41 +00:00
Simon Pilgrim
518fb821e4 [X86][SSE] Add 128/256/512 bit vector build vector from register tests
llvm-svn: 302243
2017-05-05 15:36:31 +00:00
Aditya Kumar
a88fe6cc80 [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

llvm-svn: 302238
2017-05-05 14:49:45 +00:00
Simon Pilgrim
0f1f46848c [X86][AVX512] Improve support and testing for CTLZ of 512-bit vectors without CDI
llvm-svn: 302233
2017-05-05 13:31:52 +00:00
Simon Pilgrim
266f1c4e75 [X86] Remove duplicate operation actions. NFCI.
llvm-svn: 302230
2017-05-05 12:34:55 +00:00