Commit Graph

389753 Commits

Author SHA1 Message Date
Craig Topper a41309966a [RISCV] Pre-commit test cases for D103211. NFC 2021-05-28 13:21:58 -07:00
Bardia Mahjour 06eaffa858 [NFC] Remove confusing info about MainLoop VF/UF from debug message 2021-05-28 16:10:04 -04:00
Nico Weber 65527a8082 [dsymutil tests] Try to make eh_frames.test run on other platforms
We now have llvm-otool :)
2021-05-28 15:49:31 -04:00
Marek Kurdej 8702c6da16 [clang-format] [docs] Regenerate style options documentation.
Forgotten in commits fce8c10b, 9363aa90, 8d93d7ff.
2021-05-28 21:48:36 +02:00
Eli Friedman 0b3b0a727a [AArch64][RISCV] Make sure isel correctly honors failure orderings.
If a cmpxchg specifies acquire or seq_cst on failure, make sure we
generate code consistent with that ordering even if the success ordering
is not acquire/seq_cst.

At one point, it was ambiguous whether this sort of construct was valid,
but the C++ standad and LLVM now accept arbitrary combinations of
success/failure orderings.

This doesn't address the corresponding issue in AtomicExpand. (This was
reported as https://bugs.llvm.org/show_bug.cgi?id=33332 .)

Fixes https://bugs.llvm.org/show_bug.cgi?id=50512.

Differential Revision: https://reviews.llvm.org/D103284
2021-05-28 12:47:40 -07:00
Nico Weber 1a0e5d561c [gn build] manually port 982e3c0510 (check-lld needs dsymutil) 2021-05-28 15:39:12 -04:00
Arthur O'Dwyer 8a5f0d8838 [libc++] [test] Constexpr-ify a couple of insert-iterator tests.
This should have been done in D96385; thanks ldionne for the catch!
Also, make the back/front inserter behavior tests a little more thorough,
which incidentally caught a cut-and-paste-bug in `nasty_list`, so fix that.

Differential Revision: https://reviews.llvm.org/D103318
2021-05-28 15:15:50 -04:00
LLVM GN Syncbot b6afdbac13 [gn build] Port 9968896cd6 2021-05-28 18:57:30 +00:00
Craig Topper 58cb649212 [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
Nico Weber f63adf5b67 Revert "[clang][Parse] Add parsing support for C++ attributes on using-declarations"
This reverts commit dc672999a9.
Breaks check-clang everywhere, see https://reviews.llvm.org/D91630
2021-05-28 14:49:18 -04:00
Craig Topper 2830d924b0 [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 d24d2447cd [SelectionDAG] Fix typo in assert. NFC 2021-05-28 10:37:11 -07:00
Florian Hahn 007f268c35
[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 f01df9805c
[VectorCombine] Add variants of multi-extract tests with assumes. 2021-05-28 18:35:24 +01:00
Stefan Pintilie 0159652058 Revert "Return "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration" (try 2)"
This reverts commit be1a23203b.
2021-05-28 12:21:22 -05:00
Stefan Pintilie 24bd657202 Revert "[NFCI][LoopDeletion] Only query SCEV about loop successor if another successor is also in loop"
This reverts commit b0b2bf3b5d.
2021-05-28 12:21:22 -05:00
Stefan Pintilie fd55331203 Revert "[NFC] Formatting fix"
This reverts commit 59d938e649.
2021-05-28 12:21:22 -05:00
Stefan Pintilie 807fc7cdc9 Revert "[NFC] Reuse existing variables instead of re-requesting successors"
This reverts commit c467585682.
2021-05-28 12:21:22 -05:00
Stefan Pintilie dd226803c2 Revert "[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC"
This reverts commit 7d418dadf6.
2021-05-28 12:21:21 -05:00
Sanjay Patel 403cfe5d70 [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 a279550cde [PhaseOrdering] add test for late simplifycfg with LTO; NFC
Part of D102002
2021-05-28 13:06:48 -04:00
Florian Hahn 2ee59f75fe
[LoopDeletion] Add test with potentially infinite sub-loop.
Tests for PR50511.
2021-05-28 17:45:44 +01:00
Louis Dionne 9968896cd6 [libc++] NFC: Move unwrap_iter to its own header 2021-05-28 12:42:07 -04:00
Jacques Pienaar 82f7b5e1b9 [mlir] Add missing namespace to createCanonicalizerPass. 2021-05-28 09:12:55 -07:00
Erik Pilkington dc672999a9 [clang][Parse] Add parsing support for C++ attributes on using-declarations
Differential Revision: https://reviews.llvm.org/D91630
2021-05-28 12:00:33 -04:00
Nemanja Ivanovic e0c8265437 Revert "Fix "enumerator 'llvm::TargetStackID::WasmLocal' in switch of enum 'llvm::TargetStackID::Value' is not handled" MSVC warnings. NFCI."
Since ca5f07f8c4 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 cf2eeb114c.
2021-05-28 10:53:49 -05:00
eopXD fa488ea864 [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 b6e1fb7e32 [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 4c6e2774d8 [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 0c4f76c942 [gn build] Port 58b29a4efc 2021-05-28 14:09:31 +00:00
Louis Dionne 58b29a4efc [libc++] Add all indirect callable concepts and projected
Differential Revision: https://reviews.llvm.org/D101277
2021-05-28 10:10:44 -04:00
Alexandre Ganea 2b9b9652ce [LLD][COFF] Reduce the maximum size of the GHASH table
Before this patch, the maximum size of the GHASH table was 2^31 buckets. However we were storing the bucket index into a TypeIndex which has an input limit of (2^31)-4095 indices, see this link. Any value above that limit will improperly set the TypeIndex's high bit, which is interpreted as DecoratedItemIdMask. This used to cause bad indices on extraction when calling TypeIndex::toArrayIndex().

Differential Revision: https://reviews.llvm.org/D103297
2021-05-28 09:46:17 -04:00
Florian Hahn a773b2e430
[AArch64] Add additional vector load scalarization tests for D103077. 2021-05-28 13:39:08 +01:00
Jan Svoboda b76df3235c [clang] NFC: Replace std::pair by a struct in InitHeaderSearch
This patch replaces a `std::pair` by a proper struct in `InitHeaderSearch`. This will be useful in a follow-up: D102923.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D102924
2021-05-28 14:06:25 +02:00
Nico Weber 6915a55824 [gn build] (semi-manually) port bd04d78d64 2021-05-28 08:04:52 -04:00
Florian Hahn 5bccdde070
[Matrix] Move C++ matrix cast checks to TryStaticCast.
At the moment, the matrix support in CheckCXXCStyleCast (added in
D101696) breaks function-style constructor calls that take a
single matrix value, because it is treated as matrix cast.

Instead, unify the C++ matrix cast handling by moving the logic to
TryStaticCast and only handle the case where both types are matrix
types. Otherwise, fall back to the generic mis-match detection.

Suggested by @rjmccall

Reviewed By: SaurabhJha

Differential Revision: https://reviews.llvm.org/D103163
2021-05-28 13:00:28 +01:00
Sanjay Patel 49b2f8328f [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 cf2eeb114c 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 3f5ae36833 [RISCV][NFC] Merge identical RV32 and RV64 test checks 2021-05-28 12:31:57 +01:00
Fraser Cormack f3afd0d193 [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
Tim Northover e94fada045 SwiftAsync: add Clang attribute to apply the LLVM `swiftasync` one.
Expected to be used by Swift runtime developers.
2021-05-28 12:31:12 +01:00
Lei Zhang 4694097dab [mlir] Don't elide the last op if there is no terminator
Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D103264
2021-05-28 07:25:49 -04:00
Andy Wingo ca5f07f8c4 Revert "[WebAssembly][CodeGen] IR support for WebAssembly local variables"
This reverts commit 00ecf18979, as it
broke the AMDGPU build.  Will reland later with a fix.
2021-05-28 12:42:12 +02:00
Tim Northover 9ff2eb1ea5 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 d88f96dff3 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 66ff1cbd71 [NFC][Transforms][Utils] remove useless variable in CloneBasicBlock 2021-05-28 17:50:38 +08:00
Florian Hahn ec1f6f7e3f
Revert "[LAA] Support pointer phis in loop by analyzing each incoming pointer."
This reverts commit 1ed7f8ede5.

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 690f5b7a01 [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 6133b60a27 [AMDGPU] Precommit test
Add scratch run to gfx-callable-argument-types.ll.
2021-05-28 11:22:13 +02:00
Andy Wingo 00ecf18979 [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