1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Commit Graph

209250 Commits

Author SHA1 Message Date
Alan Phipps
fba9eadd26 [Coverage] Refactor three tests from commit rG9f2967bcfe2f
Refactor three tests to not depend on other test files as input but to instead
refer to "Inputs" subdirectory.
2021-01-07 11:18:31 -06:00
Varun Gandhi
25d29dca33 [IR] Use LLVM_ENABLE_ABI_BREAKING_CHECKS to guard ABI changes.
Incorrect usage of NDEBUG to guard ABI changes can prevent clients
from enabling assertions for their C++ code while having assertions in
LLVM turned off. So we use LLVM_ENABLE_ABI_BREAKING_CHECKS instead, as
described in llvm/docs/ProgrammersManual.rst. Most types already use this
macro, however, there were a couple of stragglers in ValueHandle.h, which
are fixed by this revision.

Reviewed By: dblaikie, dexonsmith

Differential Revision: https://reviews.llvm.org/D93433
2021-01-07 08:42:00 -08:00
Mircea Trofin
617208cb1b [NFC] Removed unused prefixes in CodeGen/AMDGPU
This covers tests starting with s.

Differential Revision: https://reviews.llvm.org/D94184
2021-01-07 08:00:11 -08:00
Cameron McInally
420c91473a [SVE] Add unpacked scalable floating point ZIP/UZP/TRN patterns
Differential Revision: https://reviews.llvm.org/D94193
2021-01-07 09:56:53 -06:00
Bardia Mahjour
2f7986c4f1 [DDG] Data Dependence Graph - DOT printer tests
Adds some tests to check the formatting of the dot
file produced when using -dot-ddg.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D93949
2021-01-07 10:51:14 -05:00
Matt Arsenault
dffb6196e9 AMDGPU/GlobalISel: Start cleaning up calling convention lowering
There are various hacks working around limitations in
handleAssignments, and the logical split between different parts isn't
correct. Start separating the type legalization to satisfy going
through the DAG infrastructure from the code required to split into
register types. The type splitting should be moved to generic code.
2021-01-07 10:36:45 -05:00
Bardia Mahjour
5052dcf3b2 [DDG] Fix duplicate edge removal during pi-block formation
When creating pi-blocks we try to avoid creating duplicate edges
between outside nodes and the pi-block when an edge is of the
same kind and direction as another one that has already been
created. We do this by keeping track of the edges in an
enumerated array called EdgeAlreadyCreated. The problem is that
this array is declared local to the loop that iterates over the
nodes in the pi-block, so the information gets lost every time a
new inside-node is iterated over. The fix is to move the
declaration to the outer loop.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D94094
2021-01-07 10:31:11 -05:00
Roman Lebedev
8800a9063b [SimplifyCFG] FoldValueComparisonIntoPredecessors(): drop reachable errneous assert
I have added it in d15d81c because it *seemed* correct, was holding
for all the tests so far, and was validating the fix added in the same
commit, but as David Major is pointing out (with a reproducer),
the assertion isn't really correct after all. So remove it.

Note that the d15d81c still fine.
2021-01-07 18:05:04 +03:00
Roman Lebedev
237baae3ce [llvm-reduce] ReduceGlobalVarInitializers delta pass: fix handling of globals w/ comdat/non-external linkage
Much like with ReduceFunctionBodies delta pass,
we need to remove comdat and set linkage to external,
else verifier will complain, and our deltas are invalid.
2021-01-07 18:05:03 +03:00
Sidharth Baveja
13c023db8b [SplitEdge] Add new parameter to SplitEdge to name the newly created basic block
Summary:
Currently SplitEdge does not support passing in parameter which allows you to
name the newly created BasicBlock.

This patch updates the function such that the name of the block can be passed
in, if users of this utility decide to do so.

Reviewed By: Whitney, bmahjour, asbirlea, jamieschmeiser

Differential Revision: https://reviews.llvm.org/D94176
2021-01-07 14:49:23 +00:00
Paul C. Anagnostopoulos
bae712927d [TableGen] Add field kind to the RecordVal class.
Differential Revision: https://reviews.llvm.org/D93969
2021-01-07 09:31:27 -05:00
Simon Pilgrim
89fb4f312e [AArch64] SVEIntrinsicOpts - use range loop and cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.
Don't directly dereference a dyn_cast<> - use cast<> so we assert for the correct type.

Also, simplify the for loop to a range loop.

Fixes clang static analyzer warning.
2021-01-07 14:21:55 +00:00
Simon Pilgrim
5c92d5189c [Analysis] MemoryDepChecker::couldPreventStoreLoadForward - remove dead store. NFCI.
As we're breaking from the loop when clamping MaxVF, clang static analyzer was warning that the VF iterator was being updated and never used.
2021-01-07 14:21:54 +00:00
Caroline Concatto
0a20cec01d [AArch64][CostModel]Fix gather scatter cost model
This patch fixes a bug introduced in the patch:
https://reviews.llvm.org/D93030

This patch pulls the test for scalable vector to be the first instruction
to be checked. This avoids the Gather and Scatter cost model for AArch64 to
compute the number of vector elements for something that is not a vector and
therefore crashing.
2021-01-07 14:02:08 +00:00
Simon Pilgrim
a05d62d1a6 [llvm-objdump] Pass Twine by const reference instead of by value. NFCI. 2021-01-07 12:53:29 +00:00
Simon Pilgrim
b9e2a9c89d [DWARF] DWARFDebugLoc::dumpRawEntry - remove dead stores. NFCI.
Don't bother zeroing local (unused) variables just before returning.

Fixes clang static analyzer warning.
2021-01-07 12:53:28 +00:00
Alexey Bataev
5cd8182360 [SLP]Need shrink the load vector after reordering.
After merging the shuffles, we cannot rely on the previous shuffle
anymore and need to shrink the final shuffle, if it is required.

Reported in D92668

Differential Revision: https://reviews.llvm.org/D93967
2021-01-07 04:50:48 -08:00
Simon Pilgrim
ed64f8bab5 [DAG] Simplify OR(X,SHL(Y,BW/2)) eq/ne 0/-1 'all/any-of' style patterns
Attempt to simplify all/any-of style patterns that concatenate 2 smaller integers together into an and(x,y)/or(x,y) + icmp 0/-1 instead.

This is mainly to help some bool predicate reduction patterns where we end up concatenating bool vectors that have been bitcasted to integers.

Differential Revision: https://reviews.llvm.org/D93599
2021-01-07 12:03:19 +00:00
Jan Svoboda
88551a2c36 Reapply "[clang][cli] Allow users to specify a conditional to prevent parsing options with MarshallingInfo"
This reverts commit d0fa7a05 and fixes failing OptionMarshallingTest by adding the SHOULD_PARSE macro argument
2021-01-07 11:11:47 +01:00
Fraser Cormack
617f268f92 [RISCV] Add vector mask arithmetic ISel patterns
The patterns that want to use 'vnot' use a custom PatFrag. This is
because 'vnot' uses immAllOnesV which implicitly uses BUILD_VECTOR
rather than SPLAT_VECTOR.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D94078
2021-01-07 09:43:25 +00:00
Oliver Stannard
88767efa6e Revert "[llvm] Use BasicBlock::phis() (NFC)"
Reverting because this causes crashes on the 2-stage buildbots, for
example http://lab.llvm.org:8011/#/builders/7/builds/1140.

This reverts commit 9b228f107d43341ef73af92865f73a9a076c5a76.
2021-01-07 09:43:33 +00:00
Jan Svoboda
cd124bb53f Revert "[clang][cli] Allow users to specify a conditional to prevent parsing options with MarshallingInfo"
This reverts commit 77db83ae
2021-01-07 10:12:53 +01:00
Jan Svoboda
7640620549 [clang][cli] Allow users to specify a conditional to prevent parsing options with MarshallingInfo
Depends on D84189 & D93540.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D84674
2021-01-07 10:01:49 +01:00
LLVM GN Syncbot
c49ed45f02 [gn build] Port d2ddc694ff9 2021-01-07 08:29:23 +00:00
Gil Rapaport
b74280dc55 [LV] Merge tests into a single file (NFC)
In response to https://reviews.llvm.org/D94088#inline-879268
2021-01-07 09:04:07 +02:00
Ganesh Gopalasubramanian
1ebd32fffe [X86] Update tests for znver3
Differential Revision: https://reviews.llvm.org/D92812
2021-01-07 11:51:50 +05:30
Kazushi (Jam) Marukawa
06abe592f6 [VE][NFC] Update comments to match the generated instructions 2021-01-07 15:13:24 +09:00
Fangrui Song
9d72576890 [PowerPC] Delete dead Lower* 2021-01-06 21:58:40 -08:00
Fangrui Song
74fe4086d5 [PowerPC] Delete remnant Darwin ISelLowering code 2021-01-06 21:40:40 -08:00
Fangrui Song
fba3075f39 [PowerPC] Delete remnant isOSDarwin references 2021-01-06 21:18:35 -08:00
Sanjoy Das
ade1afb29b [NFC] Don't copy MachineFrameInfo on each invocation of HasAlias
Also fix a typo in a comment.  This fixes a compile time issue in XLA
(https://www.tensorflow.org/xla).

Differential Revision: https://reviews.llvm.org/D94182
2021-01-06 18:59:20 -08:00
Kazu Hirata
8fd273682c [llvm] Use llvm::all_of (NFC) 2021-01-06 18:27:36 -08:00
Kazu Hirata
745ad84858 [llvm] Use BasicBlock::phis() (NFC) 2021-01-06 18:27:35 -08:00
Kazu Hirata
3109d596ee [llvm] Use llvm::append_range (NFC) 2021-01-06 18:27:33 -08:00
Juneyoung Lee
871d4c4165 [InstSimplify] Fold insertelement vec, poison, idx into vec
This is a simple patch that adds folding from `insertelement vec, poison, idx` into `vec`.

Alive2 proof: https://alive2.llvm.org/ce/z/2y2vbC

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D93994
2021-01-07 10:10:14 +09:00
Juneyoung Lee
d269d5e555 [Constant] Add tests for ConstantVector::get (NFC) 2021-01-07 10:08:01 +09:00
Craig Topper
812d036280 [RISCV] Fix a few section number comments in RISCVInstrInfoVPseudos.td to match the V extension 1.0 draft spec. NFC
The majority of the comments use the 1.0 draft spec section numbers.
2021-01-06 16:38:30 -08:00
Juneyoung Lee
0b995628a9 [Constant] Update ConstantVector::get to return poison if all input elems are poison
The diff was reviewed at D93994
2021-01-07 09:26:07 +09:00
Kit Barton
52191ae5f0 [PPC] Remove old PPCSubTarget variable.
The PPCSubTarget variable has been replaced with the Subtarget variable. This
removes the remaining instances of PPCSubTarget as they are no longer necessary.
2021-01-06 17:44:07 -06:00
Jonas Devlieghere
2a4255c860 [Support] Untie the llvm::Signpost interface from llvm::Timer
Make llvm::Signpost more generic by untying from llvm::Timer. This
allows signposts to be used in a different context.

My motivation for doing this is being able to use signposts in LLDB.

Differential revision: https://reviews.llvm.org/D93655
2021-01-06 15:16:09 -08:00
Amara Emerson
f941e46d3b Fix failing triple test for macOS 11 with non-zero minor versions.
Differential Revision: https://reviews.llvm.org/D94197
2021-01-06 14:57:37 -08:00
Alina Sbirlea
d825615032 [DominatorTree] Add support for mixed pre/post CFG views.
Add support for mixed pre/post CFG views.

Update usages of the MemorySSAUpdater to use the new DT API by
requesting the DT updates to be done by the MSSAUpdater.

Differential Revision: https://reviews.llvm.org/D93371
2021-01-06 14:53:09 -08:00
Nikita Popov
c2d5b85909 [BasicAA] Fix BatchAA results for phi-phi assumptions
Change the way NoAlias assumptions in BasicAA are handled. Instead of
handling this inside the phi-phi code, always initially insert a
NoAlias result into the map and keep track whether it is used.
If it is used, then we require that we also get back NoAlias from
the recursive queries. Otherwise, the entry is changed to MayAlias.

Additionally, keep track of all location pairs we inserted that may
still be based on assumptions higher up. If it turns out one of those
assumptions is incorrect, we flush them from the cache.

The compile-time impact for the new implementation is significantly
higher than the previous iteration of this patch:
https://llvm-compile-time-tracker.com/compare.php?from=c0bb9859de6991cc233e2dedb978dd118da8c382&to=c07112373279143e37568b5bcd293daf81a35973&stat=instructions
However, it should avoid the exponential runtime cases we run into
if we don't cache assumption-based results entirely.

This also produces better results in some cases, because NoAlias
assumptions can now start at any root, rather than just phi-phi pairs.
This is not just relevant for analysis quality, but also for BatchAA
consistency: Otherwise, results would once again depend on query order,
though at least they wouldn't be wrong.

This ended up both more complicated and more expensive than I hoped,
but I wasn't able to come up with another solution that satisfies all
the constraints.

Differential Revision: https://reviews.llvm.org/D91936
2021-01-06 22:15:30 +01:00
Nikita Popov
273a7b5b40 [InstSimplify] Canonicalize non-demanded shuffle op to poison (NFCI)
I don't believe this has an observable effect, because the only
thing we care about here is replacing the operand with a constant
so following folds can apply. This change is just to make the
representation follow canonical unary shuffle form.
2021-01-06 21:22:27 +01:00
Nikita Popov
39fe1739db [InstSimplify] Fold call null/undef to poison
Calling null or undef results in immediate undefined behavior.
Return poison instead of undef in this case, similar to what
we do for immediate UB due to division by zero.
2021-01-06 21:09:30 +01:00
Nikita Popov
b3877826ec [PowerPC] Avoid call to undef in test (NFC)
Replace call to undef with a dummy function, to avoid affecting
this change by changes to call undef folding.
2021-01-06 21:09:02 +01:00
Arthur Eubanks
d2a6654c1b [test] Pin partial-unswitch.ll to legacy PM
The new PM does not have loop-unswitch, it only has simple-loop-unswitch.
2021-01-06 11:53:07 -08:00
Craig Topper
240b48a4b6 [RISCV] Return a vXi1 vector type from getSetCCResultType if V extension is enabled.
nvxXi1 types are legal with V extension and that's the result
vmseq/vmsne/vmslt/etc instructions return.

No test cases yet because the setcc isel patterns aren't in
and we'll need more than basic tests to observe this. I locally
tested that this plus D947078, D94168, D94142, and D94149
was enough to be able to handle the overflow result from
llvm.sadd.overflow.
2021-01-06 11:50:15 -08:00
Arthur Eubanks
c886828274 [test] Pin AMDGPU/opt-pipeline.ll to legacy PM
The pipeline being tested is specifically the legacy PM pipeline.
2021-01-06 11:44:16 -08:00
Arthur Eubanks
b6bbc7080f Fix non-assert builds after D93828 2021-01-06 11:42:03 -08:00