1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

216519 Commits

Author SHA1 Message Date
Nico Weber
311aa386aa [gn build] manually port 982e3c05108b6 (check-lld needs dsymutil) 2021-05-28 15:39:12 -04:00
LLVM GN Syncbot
995b39f2fa [gn build] Port 9968896cd62a 2021-05-28 18:57:30 +00:00
Craig Topper
a9af2ebabe [RISCV] Add octuple to LMULInfo tablegen class, remove octuple_from_str. NFCI
octuple_from_str was always used with the MX field from an
LMULInfo. Might as well just precompute it and put it in the class.
2021-05-28 11:53:05 -07:00
Craig Topper
22fc6f8fbe [VP] Make getMaskParamPos/getVectorLengthParamPos return unsigned. Lowercase function names.
Parameter positions seem like they should be unsigned.

While there, make function names lowercase per coding standards.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D103224
2021-05-28 11:28:47 -07:00
Craig Topper
7d56e782b7 [SelectionDAG] Fix typo in assert. NFC 2021-05-28 10:37:11 -07:00
Florian Hahn
9f507ddd21 [VectorCombine] Check indices for all extracts we scalarize.
We need to make sure that the indices of all extracts we scalarize are
valid.
2021-05-28 18:35:29 +01:00
Florian Hahn
7011f51b3d [VectorCombine] Add variants of multi-extract tests with assumes. 2021-05-28 18:35:24 +01:00
Stefan Pintilie
70b417a023 Revert "Return "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration" (try 2)"
This reverts commit be1a23203b1de655b8c7dac7549818d975a0cbbf.
2021-05-28 12:21:22 -05:00
Stefan Pintilie
d108ba73ef Revert "[NFCI][LoopDeletion] Only query SCEV about loop successor if another successor is also in loop"
This reverts commit b0b2bf3b5da950679db1431aae431a6dedea2245.
2021-05-28 12:21:22 -05:00
Stefan Pintilie
5950d60ff6 Revert "[NFC] Formatting fix"
This reverts commit 59d938e649e62db0cef4903d495e838fbc6a6eb8.
2021-05-28 12:21:22 -05:00
Stefan Pintilie
baca97070f Revert "[NFC] Reuse existing variables instead of re-requesting successors"
This reverts commit c467585682dcdda75e645ef3ab47c8b48440db12.
2021-05-28 12:21:22 -05:00
Stefan Pintilie
32cd617a76 Revert "[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC"
This reverts commit 7d418dadf6b1e6fd9bcccf7c5b5e1db74992ee70.
2021-05-28 12:21:21 -05:00
Sanjay Patel
c3c1a4a935 [PassManager] unify late simplifycfg options between regular and LTO pipelines
This is split off from D102002, and I think it is clear that
the difference in behavior was not intended. Options were
added to SimplifyCFG over time, but different chunks of
the pass pipelines were not kept in sync.
2021-05-28 13:06:49 -04:00
Sanjay Patel
87b311dfb8 [PhaseOrdering] add test for late simplifycfg with LTO; NFC
Part of D102002
2021-05-28 13:06:48 -04:00
Florian Hahn
215ae5f8ab [LoopDeletion] Add test with potentially infinite sub-loop.
Tests for PR50511.
2021-05-28 17:45:44 +01:00
Nemanja Ivanovic
a9a8ac3fc8 Revert "Fix "enumerator 'llvm::TargetStackID::WasmLocal' in switch of enum 'llvm::TargetStackID::Value' is not handled" MSVC warnings. NFCI."
Since ca5f07f8c4bc96d16ed1992b810aa3897df157f2 already reverted
the cause for this warning, this commit now causes warnings about
a default label in a switch that covers the enum.

This reverts commit cf2eeb114c59cfc3a80133e96c585188fa16cc98.
2021-05-28 10:53:49 -05:00
eopXD
00f9d45052 [LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass
This patch changes LoopFlattenPass from FunctionPass to LoopNestPass.

Utilize LoopNest and let function 'Flatten' generate information from it.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D102904
2021-05-28 15:43:12 +00:00
David Stenberg
182c5d61c0 [IR] Make TypeFinder aware of DIArgList values
TypeFinder did not find types under DIArgList. This resulted in a case
of invalid IR after GlobalOpt removed a global that was the only
non-DIArgList use of a struct type.

  error: use of undefined type named 'struct.S'
    call void @llvm.dbg.value(
      metadata !DIArgList([1 x %struct.S]* undef, i64 %idxprom),
      metadata !24, metadata !DIExpression([...]))

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D103306
2021-05-28 17:09:45 +02:00
Reid Kleckner
c5daefddfe [gn] Make ubsan errors fatal, as in cmake
Apparently ubsan errors are non-fatal by default. If you introduce UB
into LLVM and run the tests, if errors are not fatal, the test will
still produce the expected output and the tests will pass. In order to
make ubsan errors show up as test failures, they have to be made fatal.
Pass the -fno-sanitize-recover=all flag to make it so.

Differential Revision: https://reviews.llvm.org/D103298
2021-05-28 08:05:37 -07:00
LLVM GN Syncbot
a4add6ae20 [gn build] Port 58b29a4efc22 2021-05-28 14:09:31 +00:00
Florian Hahn
4c0511aa43 [AArch64] Add additional vector load scalarization tests for D103077. 2021-05-28 13:39:08 +01:00
Nico Weber
597dcf2f46 [gn build] (semi-manually) port bd04d78d649b 2021-05-28 08:04:52 -04:00
Sanjay Patel
9e8424f281 [x86] add test for extend of legal vector compare; NFC
Additional test coverage for D103280.
2021-05-28 07:50:27 -04:00
Simon Pilgrim
85d37e81e1 Fix "enumerator 'llvm::TargetStackID::WasmLocal' in switch of enum 'llvm::TargetStackID::Value' is not handled" MSVC warnings. NFCI. 2021-05-28 12:47:22 +01:00
Fraser Cormack
73950d1f03 [RISCV][NFC] Merge identical RV32 and RV64 test checks 2021-05-28 12:31:57 +01:00
Fraser Cormack
6da9384624 [RISCV] Add tests for fixed vector conversions between fp to/from i1
These fixed-length versions don't crash unlike the corresponding
scalable ones, but the code generation is scalarized. An imminent patch
will support scalable-vector conversions and improve the codegen for
these fixed-length conversions.
2021-05-28 12:31:47 +01:00
Andy Wingo
89bbb9e629 Revert "[WebAssembly][CodeGen] IR support for WebAssembly local variables"
This reverts commit 00ecf18979e3326b3afee8af3dc701c53ffdc93f, as it
broke the AMDGPU build.  Will reland later with a fix.
2021-05-28 12:42:12 +02:00
Tim Northover
859ff3505c SwiftTailCC: teach verifier musttail rules applicable to this CC.
SwiftTailCC has a different set of requirements than the C calling convention
for a tail call. The exact argument sequence doesn't have to match, but fewer
ABI-affecting attributes are allowed.

Also make sure the musttail diagnostic triggers if a musttail call isn't
actually a tail call.
2021-05-28 11:12:00 +01:00
Tim Northover
9a76c13b82 ARM: support mandatory tail calls for tailcc & swifttailcc
This adds support for callee-pop conventions to the ARM backend so that it can
ensure a call marked "tail" is actually a tail call.
2021-05-28 11:10:51 +01:00
dongAxis
2e70362adf [NFC][Transforms][Utils] remove useless variable in CloneBasicBlock 2021-05-28 17:50:38 +08:00
Florian Hahn
bfb6ec9cb5 Revert "[LAA] Support pointer phis in loop by analyzing each incoming pointer."
This reverts commit 1ed7f8ede564c3b11da4fdca30c36ccbff422576.

This change can cause loop-distribute to crash in some cases. Revert
until I have more time to wrap up a fix.

See  PR50296, PR5028 and D102266.
2021-05-28 10:33:52 +01:00
Sebastian Neubauer
64ac3b3090 [AMDGPU] Fix function calls with flat scratch
When flat scratch is used, the stack pointer needs to be added when
writing arguments to the stack.
For buffer instructions, this is done in SelectMUBUFScratchOffen
and SelectMUBUFScratchOffset.

Move that to call argument lowering, like it is done in GlobalISel.

Differential Revision: https://reviews.llvm.org/D103166
2021-05-28 11:22:13 +02:00
Sebastian Neubauer
dea11ae8c0 [AMDGPU] Precommit test
Add scratch run to gfx-callable-argument-types.ll.
2021-05-28 11:22:13 +02:00
Andy Wingo
6446c1dcda [WebAssembly][CodeGen] IR support for WebAssembly local variables
This patch adds TargetStackID::WasmLocal.  This stack holds locations of
values that are only addressable by name -- not via a pointer to memory.
For the WebAssembly target, these objects are lowered to WebAssembly
local variables, which are managed by the WebAssembly run-time and are
not addressable by linear memory.

For the WebAssembly target IR indicates that an AllocaInst should be put
on TargetStackID::WasmLocal by putting it in the non-integral address
space WASM_ADDRESS_SPACE_WASM_VAR, with value 1.  SROA will mostly lift
these allocations to SSA locals, but any alloca that reaches instruction
selection (usually in non-optimized builds) will be assigned the new
TargetStackID there.  Loads and stores to those values are transformed
to new WebAssemblyISD::LOCAL_GET / WebAssemblyISD::LOCAL_SET nodes,
which then lower to the type-specific LOCAL_GET_I32 etc instructions via
tablegen patterns.

Differential Revision: https://reviews.llvm.org/D101140
2021-05-28 11:07:41 +02:00
Yang Fan
c426e2177f [ConstantFolding] Fix -Wunused-variable warning (NFC)
GCC warning:
```
/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp: In function ‘llvm::Constant* llvm::ConstantFoldLoadFromConstPtr(llvm::Constant*, llvm::Type*, const llvm::DataLayout&)’:
/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp:713:19: warning: unused variable ‘SimplifiedGEP’ [-Wunused-variable]
  713 |         if (auto *SimplifiedGEP = dyn_cast<GEPOperator>(Simplified)) {
      |                   ^~~~~~~~~~~~~
```
2021-05-28 16:17:12 +08:00
eopXD
ed545893e8 Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass"
This reverts commit 7952ddb21fb7e086d5a6f97767f235d2f6ae2176.

Differential Revision: https://reviews.llvm.org/D103302
2021-05-28 07:58:06 +00:00
eopXD
7ef7d942e2 Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass"
This reverts commit ffc4d3e06855550a8bd2a691f6d05828d5bf4ddf.
2021-05-28 07:48:04 +00:00
eopXD
0dfabb08f1 [LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass
This patch changes LoopFlattenPass from FunctionPass to LoopNestPass.

Utilize LoopNest and let function 'Flatten' generate information from it.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D102904
2021-05-28 07:25:53 +00:00
eopXD
94aa05ba01 [LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass
This patch changes LoopFlattenPass from FunctionPass to LoopNestPass.

Utilize LoopNest and let function 'Flatten' generate information from it.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D102904
2021-05-28 07:11:26 +00:00
Amara Emerson
28e85e594b [AArch64][GlobalISel] Legalize oversize G_EXTRACT_VECTOR_ELT sources.
Also changes the fewerElements helper to use the lookthrough constant helper
instead of m_ICst, since m_ICst doesn't look through extends.

Differential Revision: https://reviews.llvm.org/D103227
2021-05-27 23:52:24 -07:00
Max Kazantsev
09f65fe8d0 Revert "[NFCI] Lazily evaluate SCEVs of PHIs"
This reverts commit 51d334a845a082338735b0fdfc620a4b15fa26fe.

Reported failures, need to analyze.
2021-05-28 11:05:30 +07:00
Reid Kleckner
6c040caec0 Pass -gcodeview-ghash when using clang-cl and lld-link
This precomputes some hashes that LLD uses for type merging to speed up
linking when PDBs are enabled. Only do this if any kind of /DEBUG flag
is passed to the linker. -gcodeview-ghash is orthogonal to /Z7, -g, -g1,
or -gmlt, so it is safe to set it independently from those flags. It
will not increase debug info emission.

Differential Revision: https://reviews.llvm.org/D103287
2021-05-27 20:49:17 -07:00
Jinsong Ji
ce930cb8c6 [AIX] Enable stackprotect feature
AIX use `__ssp_canary_word` instead of `__stack_chk_guard`.
This patch update the target hook to use correct symbol,
so that the basic stackprotect feature can work.

The traceback will be handled in follow up patch.

Reviewed By: #powerpc, shchenz

Differential Revision: https://reviews.llvm.org/D103100
2021-05-28 02:18:15 +00:00
Jianzhou Zhao
034e3da912 [dfsan] Add a flag about whether to propagate offset labels at gep
DFSan has flags to control flows between pointers and objects referred
by pointers. For example,

a = *p;
L(a) = L(*p)        when -dfsan-combine-pointer-labels-on-load = false
L(a) = L(*p) + L(p) when -dfsan-combine-pointer-labels-on-load = true

*p = b;
L(*p) = L(b)        when -dfsan-combine-pointer-labels-on-store = false
L(*p) = L(b) + L(p) when -dfsan-combine-pointer-labels-on-store = true
The question is what to do with p += c.

In practice we found many confusing flows if we propagate labels from c
to p. So a new flag works like this

p += c;
L(p) = L(p)        when -dfsan-propagate-via-pointer-arithmetic = false
L(p) = L(p) + L(c) when -dfsan-propagate-via-pointer-arithmetic = true

Reviewed-by: gbalats

Differential Revision: https://reviews.llvm.org/D103176
2021-05-28 00:06:19 +00:00
Jordan Rupprecht
b50ce5b1a4 [NFC][libObject] clang-format Archive{.h,.cpp}
In preparation for D100651
2021-05-27 16:48:40 -07:00
Andrea Di Biagio
f7539d249a [MCA] Minor changes to the InOrderIssueStage. NFC
The constructor of InOrderIssueStage no longer takes as input a reference to the
target scheduling model. The stage can always query the subtarget to obtain a
reference to the scheduling model.
The ResourceManager is no longer stored internally as a unique_ptr.
Moved a couple of method definitions to the .cpp file.
2021-05-28 00:33:59 +01:00
Arthur Eubanks
ae280a0740 [ConstFold] Simplify a load's GEP operand through local aliases
MSVC-style RTTI produces loads through a GEP of a local alias which
itself is a GEP. Currently we aren't able to devirtualize any virtual
calls when MSVC RTTI is enabled.

This patch attempts to simplify a load's GEP operand by calling
SymbolicallyEvaluateGEP() with an option to look through local aliases.

Differential Revision: https://reviews.llvm.org/D101100
2021-05-27 16:04:19 -07:00
Craig Topper
46494cad3d [RISCV] Teach VSETVLI insertion to look through PHIs to prove we don't need to insert a vsetvli.
If an instruction's AVL operand is a PHI node in the same block,
we may be able to peek through the PHI to find vsetvli instructions
that produce the AVL in other basic blocks. If we can prove those
vsetvli instructions have the same VTYPE and were the last vsetvli
in their respective blocks, then we don't need to insert a vsetvli
for this pseudo instruction.

Reviewed By: rogfer01

Differential Revision: https://reviews.llvm.org/D103277
2021-05-27 15:34:08 -07:00
Arthur Eubanks
5bf5e6c3fe [SanCov] Properly set ABI parameter attributes
Arguments need to have the proper ABI parameter attributes set.

Followup to D101806.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D103288
2021-05-27 15:27:21 -07:00
Roman Lebedev
f1fdfb9136 [NFC][X86][Codegen] Re-autogenerate a few tests to reduce noise in future changes 2021-05-28 00:58:01 +03:00