Arthur Eubanks [Thu, 27 May 2021 21:54:45 +0000 (14:54 -0700)]
[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
Roman Lebedev [Thu, 27 May 2021 21:57:15 +0000 (00:57 +0300)]
[NFC][X86][Codegen] Re-autogenerate a few tests to reduce noise in future changes
Aart Bik [Thu, 27 May 2021 20:33:32 +0000 (13:33 -0700)]
[mlir][capi] fix build issue with "all passes" registration
Some builds exposed missing dependences on trafo/conv passes.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D103283
Ryan Prichard [Thu, 27 May 2021 21:53:49 +0000 (14:53 -0700)]
[sanitizer] Android ELF TLS is supported from Q (API 29)
Reviewed By: oontvoo, MaskRay
Differential Revision: https://reviews.llvm.org/D103214
River Riddle [Thu, 27 May 2021 21:42:20 +0000 (14:42 -0700)]
[mlir-lsp-server] Add support for processing split files
MLIR tools very commonly use `// -----` to split a file into distinct sub documents, that are processed separately. This revision adds support to mlir-lsp-server for splitting MLIR files based on this sigil, and processing them separately.
Differential Revision: https://reviews.llvm.org/D102660
Andrea Di Biagio [Thu, 27 May 2021 20:50:57 +0000 (21:50 +0100)]
[MCA] Refactor the InOrderIssueStage stage. NFCI
Moved the logic that checks for RAW hazards from the InOrderIssueStage to the
RegisterFile.
Changed how the InOrderIssueStage keeps track of backend stalls. Stall events
are now generated from method notifyStallEvent().
No functional change intended.
Quinn Pham [Thu, 27 May 2021 18:35:12 +0000 (13:35 -0500)]
[PowerPC] Added multiple PowerPC builtins
This is the first in a series of patches to provide builtins for
compatibility with the XL compiler. Most of the builtins already had
intrinsics and only needed to be implemented in the front end.
Intrinsics were created for the three iospace builtins, eieio, and icbt.
Pseudo instructions were created for eieio and iospace_eieio to
ensure that nops were inserted before the eieio instruction.
Reviewed By: nemanjai, #powerpc
Differential Revision: https://reviews.llvm.org/D102443
Reid Kleckner [Thu, 20 May 2021 23:18:18 +0000 (16:18 -0700)]
[PDB] Enable parallel ghash type merging by default
Ghashing is probably going to be faster in most cases, even without
precomputed ghashes in object files.
Here is my table of results linking clang.pdb:
-------------------------------
| threads | GHASH | NOGHASH |
-------------------------------
| j1 | 51.031s | 25.141s |
| j2 | 31.079s | 22.109s |
| j4 | 18.609s | 23.156s |
| j8 | 11.938s | 21.984s |
| j28 | 8.375s | 18.391s |
-------------------------------
This shows that ghashing is faster if at least four cores are available.
This may make the linker slower if most cores are busy in the middle of
a build, but in that case, the linker probably isn't on the critical
path of the build. Incremental build performance is arguably more
important than highly contended batch build link performance.
The -time output indicates that ghash computation is the dominant
factor:
Input File Reading: 924 ms ( 1.8%)
GC: 689 ms ( 1.3%)
ICF: 527 ms ( 1.0%)
Code Layout: 414 ms ( 0.8%)
Commit Output File: 24 ms ( 0.0%)
PDB Emission (Cumulative): 49938 ms ( 94.8%)
Add Objects: 46783 ms ( 88.8%)
Global Type Hashing: 38983 ms ( 74.0%)
GHash Type Merging: 5640 ms ( 10.7%)
Symbol Merging: 2154 ms ( 4.1%)
Publics Stream Layout: 188 ms ( 0.4%)
TPI Stream Layout: 18 ms ( 0.0%)
Commit to Disk: 2818 ms ( 5.4%)
--------------------------------------------------
Total Link Time: 52669 ms (100.0%)
We can speed that up with a faster content hash (not SHA1).
Differential Revision: https://reviews.llvm.org/D102888
Craig Topper [Thu, 27 May 2021 21:04:44 +0000 (14:04 -0700)]
[RISCV] Fix typo, use addImm instead of addReg.
River Riddle [Thu, 27 May 2021 20:47:52 +0000 (13:47 -0700)]
[mlir] Add support for querying the ModRef behavior from the AliasAnalysis class
This allows for checking if a given operation may modify/reference/or both a given value. Right now this API is limited to Value based memory locations, but we should expand this to include attribute based values at some point. This is left for future work because the rest of the AliasAnalysis API also has this restriction.
Differential Revision: https://reviews.llvm.org/D101673
Martin Storsjö [Wed, 26 May 2021 10:22:23 +0000 (10:22 +0000)]
[libcxx] [test] Convert an XFAIL LIBCXX-WINDOWS-FIXME into UNSUPPORTED with explanation
Differential Revision: https://reviews.llvm.org/D103149
Martin Storsjö [Sat, 22 May 2021 22:47:04 +0000 (01:47 +0300)]
[clang] [MinGW] Don't mark emutls variables as DSO local
These actually can be automatically imported from another DLL. (This
works properly as long as the actual implementation of emutls is
linked dynamically from e.g. libgcc; if the implementation comes from
compiler-rt or a statically linked libgcc, it doesn't work as intended.)
This fixes PR50146 and https://github.com/msys2/MINGW-packages/issues/8706
(fixing calling std::call_once in a dynamically linked libstdc++);
since
f73183958482602c4588b0f4a1c3a096e7542947 the dso_local attribute
on the TLS variable affected the actual generated code for accessing
the emutls variable.
The dso_local attribute on the emutls variable made those accesses to
use 32 bit relative addressing in code, which requires runtime pseudo
relocations in the text section, and breaks entirely if the actual
other variable ends up loaded too far away in the virtual address
space.
Differential Revision: https://reviews.llvm.org/D102970
Louis Dionne [Thu, 27 May 2021 20:51:38 +0000 (16:51 -0400)]
[libc++] NFC: Make it easier for vendors to extend the run-buildbot script
Erich Keane [Thu, 27 May 2021 20:40:15 +0000 (13:40 -0700)]
Replace 'magic static' with a member variable for SCYL kernel names
I discovered when merging the __builtin_sycl_unique_stable_name into my
downstream that it is actually possible for the cc1 invocation to have
more than 1 Sema instance, if you pass it multiple input files, each
gets its own Sema instance and thus ASTContext instance. The result was
that the call to Filter the SYCL kernels was using an
ItaniumMangleContext stored via a 'magic static', so it had an invalid
reference to ASTContext when processing the 2nd failure.
The failure is unfortunately flakey/transient, but the test that fails
was added anyway.
The magic-static was switched to a unique_ptr member variable in
ASTContext that is initialized when needed.
Sanjay Patel [Thu, 27 May 2021 19:13:16 +0000 (15:13 -0400)]
[x86] add tests for extend of vector compare; NFC
Roman Lebedev [Thu, 27 May 2021 20:24:19 +0000 (23:24 +0300)]
[NFC][X86][Codegen] vector-interleaved-store-i16-stride-5.ll: precisely match the actual IR
Now that i've reimplemented the testcase generator
to produce actual IR (https://godbolt.org/z/s7PM8E6v9),
it turns out that this was the only discrepancy
from what the LV would produce.
Adrian Prantl [Thu, 27 May 2021 01:23:02 +0000 (18:23 -0700)]
Support stripping indirectly referenced DILocations from !llvm.loop metadata
in stripDebugInfo(). This patch fixes an oversight in
https://reviews.llvm.org/D96181 and also takes into account loop
metadata pointing to other MDNodes that point into the debug info.
rdar://
78487175
Differential Revision: https://reviews.llvm.org/D103220
Georgeta Igna [Thu, 27 May 2021 19:25:49 +0000 (12:25 -0700)]
[analyzer] RetainCountChecker: Disable reference counting for OSMetaClass.
It is a reference-counted class but it uses different methods for that
and the checker doesn't understand them yet.
Differential Revision: https://reviews.llvm.org/D103081
Eugene Zhulenev [Thu, 27 May 2021 19:42:59 +0000 (12:42 -0700)]
[mlir:Async] Convert assertions to async errors only inside async functions
Differential Revision: https://reviews.llvm.org/D103278
Walter Erquinigo [Thu, 20 May 2021 19:41:09 +0000 (12:41 -0700)]
[lldb][intel-pt] Remove old plugin
Now that LLDB proper has built-in support for intel-pt traces, we can remove the old plugin written by Intel. It has less features and it's hard to work with.
As a test, I ran "ninja lldbIntelFeatures" and it worked.
Differential Revision: https://reviews.llvm.org/D102866
Craig Topper [Thu, 27 May 2021 18:28:19 +0000 (11:28 -0700)]
[RISCV] Add a test showing missed opportunity to avoid a vsetvli in a loop.
This is another case we need to look through a phi to prove.
Louis Dionne [Thu, 27 May 2021 18:22:38 +0000 (14:22 -0400)]
[libc++] NFC: Refactor raw_storage_iterator test to use UNSUPPORTED markup
The test would previously disable itself using `#if TEST_STD_VER` instead
of using UNSUPPORTED markup.
Vitaly Buka [Thu, 27 May 2021 17:02:47 +0000 (10:02 -0700)]
[NFC][scudo] Check zeros on smaller allocations
1Tb counting was the slowest test under the QEMU with MTE.
Jacques Pienaar [Thu, 27 May 2021 18:11:58 +0000 (11:11 -0700)]
[mlir] Update cmake variable post D102976
Eugene Zhulenev [Thu, 27 May 2021 17:47:21 +0000 (10:47 -0700)]
[mlir] AsyncRefCounting: check that LivenessBlockInfo is not nullptr
Differential Revision: https://reviews.llvm.org/D103270
Saleem Abdulrasool [Thu, 27 May 2021 17:43:09 +0000 (10:43 -0700)]
MC: mark `dump` with `LLVM_DUMP_METHOD`
Mark the `ELFRelocationEntry::dump` method as `LLVM_DUMP_METHOD` to
annotate it properly as used to prevent the function being dead stripped
away. This allows use of `dump` in the debugger. This is purely to
improve the developer experience.
Vitaly Buka [Thu, 27 May 2021 16:49:34 +0000 (09:49 -0700)]
[NFC][scudo] Rename internal function
Louis Dionne [Thu, 27 May 2021 17:42:00 +0000 (13:42 -0400)]
Revert "[libc++] NFC: Parenthesize expression to satisfy GCC 11"
That fix was actually incorrect and caused tests to start failing.
Roman Lebedev [Thu, 27 May 2021 17:29:27 +0000 (20:29 +0300)]
[NFC][X86][Codegen] Re-autogenerate check lines in a few tests to remove noise from future changes
Simon Pilgrim [Thu, 27 May 2021 15:25:45 +0000 (16:25 +0100)]
[CostModel][X86] Improve accuracy of sext/zext to 256-bit vector costs on AVX1 targets
Determined from llvm-mca analysis (btver2 vs bdver2 vs sandybridge), the split+extends+concat sequence on AVX1 capable targets are cheaper than the #ops that the cost was previously based on.
Craig Topper [Thu, 27 May 2021 16:32:11 +0000 (09:32 -0700)]
[RISCV] Teach vsetvli insertion to use vsetvl x0, x0 form when we can tell that VLMAX and AVL haven't changed.
This can help avoid needing a virtual register for the vsetvl output
when the AVL is X0. For other register AVLs it can shorter the live
range of the AVL register if it isn't needed later.
There's probably no advantage when AVL is a 5 bit immediate that
can use vsetivli. But do it anyway for consistency.
Reviewed By: rogfer01
Differential Revision: https://reviews.llvm.org/D103215
thomasraoux [Thu, 27 May 2021 16:26:06 +0000 (09:26 -0700)]
[mlir][NFC] Don't outline kernel in MMA integration tests
This matches better how other gpu integration tests are done.
Differential Revision: https://reviews.llvm.org/D103099
Eugene Zhulenev [Wed, 26 May 2021 20:33:38 +0000 (13:33 -0700)]
[mlir] Async: Add error propagation support to async groups
Depends On D103109
If any of the tokens/values added to the `!async.group` switches to the error state, than the group itself switches to the error state.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D103203
Craig Topper [Thu, 27 May 2021 15:31:57 +0000 (08:31 -0700)]
[X86] Fold (shift undef, X)->0 for vector shifts by immediate.
We could previously do this by accident through the later
call to getTargetConstantBitsFromNode I think, but that only worked
if N0 had a single use. This patch makes it explicit for undef and
doesn't have a use count check.
I think this is needed to move the (shl X, 1)->(add X, X)
fold to isel for PR50468. We need to be sure X won't be IMPLICIT_DEF
which might prevent the same vreg from being used for both operands.
Differential Revision: https://reviews.llvm.org/D103192
Craig Topper [Thu, 27 May 2021 15:21:07 +0000 (08:21 -0700)]
[X86] Pre-commit tests for D103192. NFC
Eugene Zhulenev [Tue, 25 May 2021 22:06:34 +0000 (15:06 -0700)]
[mlir] Add error state and error propagation to async runtime values
Depends On D103102
Not yet implemented:
1. Error handling after synchronous await
2. Error handling for async groups
Will be addressed in the followup PRs
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D103109
Marco Elver [Thu, 27 May 2021 16:24:21 +0000 (18:24 +0200)]
[Clang] Enable __has_feature(coverage_sanitizer)
Like other sanitizers, enable __has_feature(coverage_sanitizer) if clang
has enabled at least one SanitizerCoverage instrumentation type.
Because coverage instrumentation selection is not handled via normal
-fsanitize= (and thus not in SanitizeSet), passing this information
through to LangOptions required propagating the already parsed
-fsanitize-coverage= options from CodeGenOptions through to LangOptions
in FixupInvocation().
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D103159
Eugene Zhulenev [Tue, 25 May 2021 18:02:42 +0000 (11:02 -0700)]
[mlir] Async reference counting for block successors with divergent reference counted liveness
Support reference counted values implicitly passed (live) only to some of the successors.
Example: if branched to ^bb2 token will leak, unless `drop_ref` operation is properly created
```
^entry:
%token = async.runtime.create : !async.token
cond_br %cond, ^bb1, ^bb2
^bb1:
async.runtime.await %token
async.runtime.drop_ref %token
br ^bb2
^bb2:
return
```
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D103102
maekawatoshiki [Thu, 27 May 2021 16:17:23 +0000 (01:17 +0900)]
[LoopUnrollAndJam] Change LoopUnrollAndJamPass to LoopNest pass
This patch changes LoopUnrollAndJamPass from FunctionPass to LoopNest pass.
The next patch will utilize LoopNest to effectively handle loop nests.
Reviewed By: Whitney
Differential Revision: https://reviews.llvm.org/D99149
Qiu Chaofan [Thu, 27 May 2021 16:10:04 +0000 (00:10 +0800)]
[SPE] Disable strict-fp for SPE by default
As discussed in PR50385, strict-fp on PowerPC SPE has not been handled
well. This patch disables it by default for SPE.
Reviewed By: nemanjai, vit9696, jhibbits
Differential Revision: https://reviews.llvm.org/D103235
thomasraoux [Thu, 27 May 2021 15:58:11 +0000 (08:58 -0700)]
[mlir][gpu] Relax restriction on MMA store op to allow chain of mma ops.
In order to allow large matmul operations using the MMA ops we need to chain
operations this is not possible unless "DOp" and "COp" type have matching
layout so remove the "DOp" layout and force accumulator and result type to
match.
Added a test for the case where the MMA value is accumulated.
Differential Revision: https://reviews.llvm.org/D103023
Yaxun (Sam) Liu [Sun, 23 May 2021 03:45:15 +0000 (23:45 -0400)]
[HIP] Check compatibility of -fgpu-sanitize with offload arch
-fgpu-sanitize is incompatible with offload arch containing xnack-.
This patch checks that.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D102975
Fraser Cormack [Thu, 27 May 2021 15:54:42 +0000 (16:54 +0100)]
[RISCV] Add a test case showing incorrect call-conv lowering
@HsiangKai helped find a bug in the lowering of indirect split
scalable-vector types in our calling convention. An imminent patch will
fix this.
Matt Arsenault [Tue, 18 May 2021 21:05:49 +0000 (17:05 -0400)]
GlobalISel: Do not change register types in lowerLoad
Adjusting the load register type is a widenScalar type action, not a
lowering. lowerLoad should be reserved for operations that change the
memory access size, such as unaligned load decomposition. With this
trying to adjust the register type, it was hard to avoid infinite
loops in the legalizer. Adds a bandaid to avoid regressing a few
AArch64 tests, but I'm not sure what the exact condition is and
there's probably a cleaner way to do this.
For AMDGPU this regresses handling of some cases for unaligned loads,
but the way this is currently working is a pretty ugly hack.
jasonliu [Thu, 27 May 2021 15:47:20 +0000 (15:47 +0000)]
[AIX] Add -lc++abi and -lunwind for linking
Summary:
We are going to have libc++abi.a and libunwind.a on AIX.
Add the necessary linking command to pick the libraries up.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D102813
Aaron Puchert [Thu, 27 May 2021 15:45:59 +0000 (17:45 +0200)]
Thread safety analysis: Allow exlusive/shared joins for managed and asserted capabilities
Similar to how we allow managed and asserted locks to be held and not
held in joining branches, we also allow them to be held shared and
exclusive. The scoped lock should restore the original state at the end
of the scope in any event, and asserted locks need not be released.
We should probably only allow asserted locks to be subsumed by managed,
not by (directly) acquired locks, but that's for another change.
Reviewed By: delesley
Differential Revision: https://reviews.llvm.org/D102026
Aaron Puchert [Thu, 27 May 2021 15:44:43 +0000 (17:44 +0200)]
Thread safety analysis: Factor out function for merging locks (NFC)
It's going to become a bit more complicated, so let's have it separate.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D102025
Nico Weber [Thu, 27 May 2021 15:40:51 +0000 (11:40 -0400)]
Revert "Emit correct location lists with basic block sections."
Breaks check-llvm on non-linux, see comments on https://reviews.llvm.org/D85085
This reverts commit
caae570978c490a137921b9516162a382831209e
and follow-up commit
1546c52d971292ed4145b6d41aaca0d02229ebff.
Louis Dionne [Thu, 27 May 2021 15:41:26 +0000 (11:41 -0400)]
[libc++] NFC: Parenthesize expression to satisfy GCC 11
Otherwise it issues a -Werror=parentheses suggesting parentheses.
Louis Dionne [Tue, 25 May 2021 22:15:58 +0000 (18:15 -0400)]
[libc++] Deprecate std::iterator and remove it as a base class
C++17 deprecated std::iterator and removed it as a base class for all
iterator adaptors. We implement that change, but we still provide a way
to inherit from std::iterator in the few cases where doing otherwise
would be an ABI break.
Supersedes D101729 and the std::iterator base parts of D103101 and D102657.
Differential Revision: https://reviews.llvm.org/D103171
Matt Arsenault [Tue, 25 May 2021 20:25:34 +0000 (16:25 -0400)]
AMDGPU/GlobalISel: Use IncomingValueAssigner for implicit return
This makes no real difference since we assign the same register either
way.
Matt Arsenault [Fri, 21 May 2021 00:50:34 +0000 (20:50 -0400)]
AMDGPU/GlobalISel: Fix broken test run line
Simon Pilgrim [Thu, 27 May 2021 14:36:29 +0000 (15:36 +0100)]
[CostModel][X86] AVX512 truncation ops are slower than cost models indicate.
The SkylakeServer model (and later IceLake/TigerLake targets according to Agner) have the PMOV truncations as uops=2, rthroughput=2 instructions.
Noticed while trying to reduce the diffs between cost tables and llvm-mca analysis.
Simon Pilgrim [Wed, 26 May 2021 16:42:22 +0000 (17:42 +0100)]
[X86][SSE] Regenerate some tests to expose the rip relative vector/broadcast loads
Sven van Haastregt [Thu, 27 May 2021 15:06:33 +0000 (16:06 +0100)]
[OpenCL][NFC] Fix typos in test
Isaac Perry [Thu, 27 May 2021 07:56:16 +0000 (08:56 +0100)]
[Flang][Openmp] Fortran specific semantic checks for Allocate directive
This patch adds the following Fortran specific semantic checks for the OpenMP
Allocate directive.
1) A type parameter inquiry cannot appear in an ALLOCATE directive.
2) List items specified in the ALLOCATE directive must not have the ALLOCATABLE
attribute unless the directive is associated with an ALLOCATE statement.
Co-authored-by: Irina Dobrescu <irina.dobrescu@arm.com>
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D102061
Matt Arsenault [Mon, 29 Oct 2018 22:55:33 +0000 (18:55 -0400)]
VirtRegMap: Preserve LiveDebugVariables
This avoids recomputing it between regalloc runs when allocation is
split, and also avoids a debug info test regression.
Aaron Ballman [Thu, 27 May 2021 14:37:33 +0000 (10:37 -0400)]
Disable misc-no-recursion checking in Clang
We currently enable misc-no-recursion, but Clang uses recursion
intentionally in a fair number of places (like RecursiveASTVisitor).
Disabling this check reduces a noise in reviews that add new AST nodes,
like https://reviews.llvm.org/D103112#2780747 which has five CI
warnings that the author can do nothing about.
Fraser Cormack [Mon, 24 May 2021 14:24:54 +0000 (15:24 +0100)]
[VP][SelectionDAG] Add a target-configurable EVL operand type
This patch adds a way for the target to configure the type it uses for
the explicit vector length operands of VP SDNodes. The type must be a
legal integer type (there is still no target-independent legalization of
this operand) and must currently be at least as big as i32, the type
used by the IR intrinsics. An implicit zero-extension takes place on
targets which choose a larger type. All VP nodes should be created with
this type used for the EVL operand.
This allows 64-bit RISC-V to avoid custom legalization of all VP nodes,
keeping them in their target-independent form for that bit longer.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D103027
Mats Petersson [Fri, 30 Apr 2021 13:13:55 +0000 (14:13 +0100)]
[OpenMP]Add support for workshare loop modifier in lowering
When lowering the dynamic, guided, auto and runtime types of scheduling,
there is an optional monotonic or non-monotonic modifier. This patch
adds support in the OMP IR Builder to pass this down to the runtime
functions.
Also implements tests for the variants.
Differential Revision: https://reviews.llvm.org/D102008
Aaron Ballman [Thu, 27 May 2021 14:25:39 +0000 (10:25 -0400)]
Hopefully fix the Clang sphinx doc build.
This was broken several days ago in
826905787ae4c8540bb8a2384fac59c606c7eaff.
Erich Keane [Thu, 27 May 2021 14:19:20 +0000 (07:19 -0700)]
Correct the 'KEYALL' mask.
It should technically be a 1, since we are only setting the first bit.
Jamie Schmeiser [Thu, 27 May 2021 14:19:13 +0000 (10:19 -0400)]
Reuse temporary files for print-changed=diff
Summary:
Make the file name and descriptors static so that they are reused by
print-changed=diff. This avoids errors about being unable to create
temporary files when doing the later comparisons in a large compile.
Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: aeubanks (Arthur Eubanks)
Differential Revision: https://reviews.llvm.org/D100116
Erich Keane [Fri, 23 Apr 2021 15:22:35 +0000 (08:22 -0700)]
Reimplement __builtin_unique_stable_name-
The original version of this was reverted, and @rjmcall provided some
advice to architect a new solution. This is that solution.
This implements a builtin to provide a unique name that is stable across
compilations of this TU for the purposes of implementing the library
component of the unnamed kernel feature of SYCL. It does this by
running the Itanium mangler with a few modifications.
Because it is somewhat common to wrap non-kernel-related lambdas in
macros that aren't present on the device (such as for logging), this
uniquely generates an ID for all lambdas involved in the naming of a
kernel. It uses the lambda-mangling number to do this, except replaces
this with its own number (starting at 10000 for readabililty reasons)
for lambdas used to name a kernel.
Additionally, this implements itself as constexpr with a slight catch:
if a name would be invalidated by the use of this lambda in a later
kernel invocation, it is diagnosed as an error (see the Sema tests).
Differential Revision: https://reviews.llvm.org/D103112
Aaron Ballman [Thu, 27 May 2021 13:54:09 +0000 (09:54 -0400)]
Speculatively fix this harder and with improved spelling capabilities.
Aaron Ballman [Thu, 27 May 2021 13:48:43 +0000 (09:48 -0400)]
Speculatively fix a -Woverloaded-virtual diagnostic; NFC
Matt Arsenault [Tue, 18 May 2021 22:22:09 +0000 (18:22 -0400)]
AMDGPU/GlobalISel: Lower constant-32-bit zextload/sextload consistently
We were accidentally leaning on code in lowerLoad which expands
extending loads which should be removed.
Matt Arsenault [Tue, 18 May 2021 21:02:25 +0000 (17:02 -0400)]
AMDGPU/GlobalISel: Remove redundant parameter from function
Aaron Ballman [Thu, 27 May 2021 13:23:20 +0000 (09:23 -0400)]
Fix -Wswitch warning; NFC
Fraser Cormack [Wed, 26 May 2021 15:04:59 +0000 (16:04 +0100)]
[DAGCombine][RISCV] Don't try to trunc-store combined vector stores
DAGCombine's `mergeStoresOfConstantsOrVecElts` optimization is told
whether it's to use vector types and also whether it's to issue a
truncating store. However, the truncating store code path assumes a
scalar integer `ConstantSDNode`, and when using vector types it creates
either a `BUILD_VECTOR` or `CONCAT_VECTORS` to store: neither of which
is a constant.
The `riscv64` target is able to expose a crash here because it switches
on both code paths at the same time. The `f32` is stored as `i32` which
must be promoted to `i64`, necessitating a truncating store.
It also decides later that it prefers a vector store of `v2f32`.
While vector truncating stores are legal, this combine is not able to
emit them. We also don't have a test case. This patch adds an assert to
catch this case more gracefully, and updates one of the caller functions
to the function to turn off the use of truncating stores when preferring
vectors.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D103173
Fraser Cormack [Thu, 13 May 2021 16:34:29 +0000 (17:34 +0100)]
[RISCV] Allow passing fixed-length vectors via the stack
The vector calling convention dictates that when the vector argument
registers are exhaused, GPRs are used to pass the address via the stack.
When the GPRs themselves are exhausted, at best we would previously
crash with an assertion, and at worst we'd generate incorrect code.
This patch addresses this issue by passing fixed-length vectors via the
stack with their full fixed-length size and aligned to their element
type size. Since the calling convention lowering can't yet handle
scalable vector types, this patch adds a fatal error to make it clear
that we are lacking in this regard.
Reviewed By: HsiangKai
Differential Revision: https://reviews.llvm.org/D102422
Florian Hahn [Thu, 27 May 2021 12:53:33 +0000 (13:53 +0100)]
[VPlan] Do not sink uniform recipes in sinkScalarOperands.
For uniform ReplicateRecipes, only the first lane should be used, so
sinking them would mean we have to compute the value of the first lane
multiple times. Also, at the moment, sinking them causes a crash because
the value of the first lane is re-used by all users.
Reported post-commit for D100258.
Aaron Ballman [Thu, 27 May 2021 12:41:00 +0000 (08:41 -0400)]
Add support for #elifdef and #elifndef
WG14 adopted N2645 and WG21 EWG has accepted P2334 in principle (still
subject to full EWG vote + CWG review + plenary vote), which add
support for #elifdef as shorthand for #elif defined and #elifndef as
shorthand for #elif !defined. This patch adds support for the new
preprocessor directives.
Nicolas Vasilache [Thu, 27 May 2021 12:19:39 +0000 (12:19 +0000)]
[mlir][Linalg] Add comprehensive bufferization support for subtensor (5/n)
This revision refactors and simplifies the pattern detection logic: thanks to SSA value properties, we can actually look at all the uses of a given value and avoid having to pattern-match specific chains of operations.
A bufferization pattern for subtensor is added and specific inplaceability analysis is implemented for the simple case of subtensor. More advanced use cases will follow.
Differential revision: https://reviews.llvm.org/D102512
Simon Giesecke [Thu, 20 May 2021 08:04:33 +0000 (08:04 +0000)]
Add --quiet option to llvm-gsymutil to suppress output of warnings.
Differential Revision: https://reviews.llvm.org/D102829
Mats Petersson [Thu, 27 May 2021 12:07:20 +0000 (13:07 +0100)]
Revert "[OpenMP]Add support for workshare loop modifier in lowering"
This reverts commit
ea4c5fb04c6d9618d451fb2d2c360dc95c6d9131.
Pushpinder Singh [Thu, 27 May 2021 10:55:38 +0000 (10:55 +0000)]
[AMDGPU][Libomptarget][NFC] Remove atmi_mem_place_t
This struct was used to specify the device on which memory was
being allocated/free in atmi_malloc/free. It has now been replaced
with int DeviceId.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D103239
Mats Petersson [Fri, 30 Apr 2021 13:13:55 +0000 (14:13 +0100)]
[OpenMP]Add support for workshare loop modifier in lowering
When lowering the dynamic, guided, auto and runtime types of scheduling,
there is an optional monotonic or non-monotonic modifier. This patch
adds support in the OMP IR Builder to pass this down to the runtime
functions.
Also implements tests for the variants.
Differential Revision: https://reviews.llvm.org/D102008
David Green [Thu, 27 May 2021 11:20:19 +0000 (12:20 +0100)]
[ARM] Extra test for reverted WLS memset. NFC
Max Sagebaum [Thu, 27 May 2021 11:10:45 +0000 (13:10 +0200)]
[clang-format] [NFC] realign documentation in Format.h...
... and ClanfFormatStyleOptions.rst for EmptyLineAfterAccessModifier
Differential-Revision: https://reviews.llvm.org/D102989
Benjamin Kramer [Thu, 27 May 2021 10:31:00 +0000 (12:31 +0200)]
Add triples to a bunch of x86-specific tests that currently fail on PPC
James Henderson [Wed, 26 May 2021 11:04:24 +0000 (12:04 +0100)]
[lit][test] Improve testing of use_llvm_tool
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D103154
Florian Hahn [Thu, 27 May 2021 09:54:08 +0000 (10:54 +0100)]
[Matrix] Include matrix pipeline for new PM in new-pm-defaults.ll.
-enable-matrix just adds a single pass, so it's easier to just check in
new-pm-default.ll rather than duplicating the full checks for -O3 with
the new pass manager.
Suggested post-commit by @aeubanks.
Fraser Cormack [Wed, 26 May 2021 09:54:35 +0000 (10:54 +0100)]
[SelectionDAG][RISCV] Don't unroll 0/1-type bool VSELECTs
This patch extends the cases in which the legalizer is able to express
VSELECT in terms of XOR/AND/OR. When dealing with a VSELECT between
boolean vector types, the mask itself is an all-ones or all-ones value
of the operand type, so a 0/1 boolean type behaves identically to a 0/-1
type.
This greatly helps RISC-V which relies on expansion for these nodes. It
also allows scalable-vector bool VSELECTs to use the default expansion,
where before it would crash in SelectionDAG::UnrollVectorOp.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D103147
Sebastian Neubauer [Wed, 26 May 2021 16:50:19 +0000 (18:50 +0200)]
[AMDGPU][GlobalISel] Allow amdgpu_gfx calling conv
Calling functions from shaders already works with the SelectionDAG.
Differential Revision: https://reviews.llvm.org/D103183
Matthias Springer [Thu, 27 May 2021 08:26:45 +0000 (17:26 +0900)]
[mlir] Support dialect-wide canonicalization pattern registration
* Add `hasCanonicalizer` option to Dialect.
* Initialize canonicalizer with dialect-wide canonicalization patterns.
* Add test case to TestDialect.
Dialect-wide canonicalization patterns are useful if a canonicalization pattern does not conceptually associate with any single operation, i.e., it should not be registered as part of an operation's `getCanonicalizationPatterns` function. E.g., this is the case for canonicalization patterns that match an op interface.
Differential Revision: https://reviews.llvm.org/D103226
Max Kazantsev [Thu, 27 May 2021 08:18:30 +0000 (15:18 +0700)]
[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC
Max Kazantsev [Thu, 27 May 2021 08:01:20 +0000 (15:01 +0700)]
[NFC] Reuse existing variables instead of re-requesting successors
Amara Emerson [Thu, 20 May 2021 04:35:05 +0000 (21:35 -0700)]
[GlobalISel] Implement splitting of G_SHUFFLE_VECTOR.
Thhis is a port from the DAG legalization. We're still missing some of the
canonicalizations of shuffles but it's a start.
Differential Revision: https://reviews.llvm.org/D102828
Alexander Belyaev [Thu, 27 May 2021 06:59:05 +0000 (08:59 +0200)]
[mlir] Add TestLinalgDistribution.cpp to cmake build.
Fangrui Song [Thu, 27 May 2021 06:57:32 +0000 (23:57 -0700)]
[docs] llvm-objdump: Mention -M no-aliases is supported on AArch64
Alexander Belyaev [Wed, 26 May 2021 18:22:49 +0000 (20:22 +0200)]
[mlir] Add a pass to distribute linalg::TiledLoopOp.
Differential Revision: https://reviews.llvm.org/D103194
Max Kazantsev [Thu, 27 May 2021 06:20:57 +0000 (13:20 +0700)]
[NFCI] Lazily evaluate SCEVs of PHIs
Eager evaluation has cost of compile time. Only query them if they are
required for proving predicates.
Max Kazantsev [Thu, 27 May 2021 05:50:54 +0000 (12:50 +0700)]
[NFC] Formatting fix
Max Kazantsev [Thu, 27 May 2021 04:47:30 +0000 (11:47 +0700)]
[NFCI][LoopDeletion] Only query SCEV about loop successor if another successor is also in loop
Esme-Yi [Thu, 27 May 2021 04:53:14 +0000 (04:53 +0000)]
[llvm-objdump] Print the DEBUG type under `--section-headers`.
Summary: Under the option --section-headers, we can only
print the section types of TEXT, DATA, and BSS for now.
This patch adds the DEBUG type.
Reviewed By: jhenderson, Higuoxing
Differential Revision: https://reviews.llvm.org/D102603
LLVM GN Syncbot [Thu, 27 May 2021 04:42:56 +0000 (04:42 +0000)]
[gn build] Port
857fa7b7b187
LLVM GN Syncbot [Thu, 27 May 2021 04:42:55 +0000 (04:42 +0000)]
[gn build] Port
0dc7fd1bc167
Christopher Di Bella [Sun, 16 May 2021 01:39:22 +0000 (01:39 +0000)]
[libcxx][iterator] adds `std::ranges::prev`
Implements part of P0896 'The One Ranges Proposal'.
Implements [range.iter.op.prev].
Depends on D102563.
Differential Revision: https://reviews.llvm.org/D102564
Christopher Di Bella [Sat, 8 May 2021 05:02:43 +0000 (05:02 +0000)]
[libcxx][iterator] adds `std::ranges::next`
Implements part of P0896 'The One Ranges Proposal'.
Implements [range.iter.op.next].
Depends on D101922.
Differential Revision: https://reviews.llvm.org/D102563