peter klausler [Wed, 13 Oct 2021 00:14:14 +0000 (17:14 -0700)]
[flang] Fix Windows build
A recently added class constructor needs to be "explicit" to
prevent it from being available for use as a conversion, which
is breaking the MSVC build of flang.
Matthias Springer [Wed, 13 Oct 2021 00:08:20 +0000 (09:08 +0900)]
[mlir][linalg][bufferize][NFC] Reduce code duplication around bufferizableInPlaceAnalysis
Differential Revision: https://reviews.llvm.org/D111380
Fangrui Song [Tue, 12 Oct 2021 23:18:51 +0000 (16:18 -0700)]
[X86] Remove little support we had for MPX
GCC 9.1 removed Intel MPX support. Linux kernel removed MPX in 2019.
glibc 2.35 will remove MPX.
Our support is limited: we support assembling of bndmov but not bnd.
Just remove it.
Reviewed By: pengfei, skan
Differential Revision: https://reviews.llvm.org/D111517
Fangrui Song [Tue, 12 Oct 2021 23:16:58 +0000 (16:16 -0700)]
[lldb][test] Remove Intel MPX tests
Intel MPX failed to gain wide adoption and has been deprecated for a while.
GCC 9.1 removed Intel MPX support. Linux kernel removed MPX in 2019.
glibc 2.35 will remove the support.
thomasraoux [Tue, 12 Oct 2021 23:09:49 +0000 (16:09 -0700)]
[mlir] update new linalg vectorization tests after vectorization fix
peter klausler [Mon, 11 Oct 2021 22:41:14 +0000 (15:41 -0700)]
[flang] runtime: fix output B/O/Z editing of "negative" values
B/O/Z integer output editing must not reflect any sign extension
of scalar output values. Add more size-dependent OutputInteger
I/O APIs and kind instantiations of EditIntegerOutput.
Differential Revision: https://reviews.llvm.org/D111678
peter klausler [Tue, 12 Oct 2021 17:17:02 +0000 (10:17 -0700)]
[flang][NFC] Document extension: scalars are trivially contiguous
The Fortran 2018 standard defines the concept of simple contiguity
in subclause 9.5.4 as a characteristic of arrays. So that scalars
may also be used in contexts where simply contiguous arrays are
allowed, f18 treats them as single-element arrays that are trivially
contiguous. This patch documents this semantic extension and
also adds comments to the predicate that implements the concept.
Differential Revision: https://reviews.llvm.org/D111679
peter klausler [Tue, 12 Oct 2021 20:35:28 +0000 (13:35 -0700)]
[flang][NFC] Address warnings from Windows build
An LLVM Flang build bot for Windows recently failed with a
bunch of warning messages. None were from recent changes to
the Fortran compiler; I suspect that a newer (or maybe older)
version of MSVC was being used, or perhaps a different set of
compiler options were temporarily applied to the build, since
the buildbot status went back to green shortly thereafter.
Most of the warnings looked bogus to me, but some are legitimate
concerns and we might as well clean them up. This patch does so.
Differential Revision: https://reviews.llvm.org/D111677
Vitaly Buka [Tue, 12 Oct 2021 05:18:00 +0000 (22:18 -0700)]
[sanitizer] Remove StackDepotReverseMap
Now StackDepotGet can retrive the stack in O(1).
Depends on D111612.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111613
Vitaly Buka [Tue, 12 Oct 2021 02:44:09 +0000 (19:44 -0700)]
[sanitizer] Remove id and replace link with u32
This lets us reduce size of Node, similar to D111183 proposal.
Depends on D111610.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111612
thomasraoux [Tue, 12 Oct 2021 22:42:02 +0000 (15:42 -0700)]
[mlir][linalg] Fix generic reduction vectorization
We shouldn't broadcast the original value when doing reduction. Instead
we compute the reduction and then combine it with the original value.
Differential Revision: https://reviews.llvm.org/D111666
Arthur Eubanks [Tue, 12 Oct 2021 21:18:31 +0000 (14:18 -0700)]
[NFC] Rename EmitAssemblyHelper new/legacy PM methods
To reflect the fact that the new PM is the default now.
Differential Revision: https://reviews.llvm.org/D111680
Vitaly Buka [Tue, 12 Oct 2021 22:33:21 +0000 (15:33 -0700)]
[sanitizer] Fix test on Windows
Vitaly Buka [Tue, 12 Oct 2021 01:37:25 +0000 (18:37 -0700)]
[NFC][sanitizer] Add a few consts
Depends on D111609.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111610
Lang Hames [Tue, 12 Oct 2021 21:55:49 +0000 (14:55 -0700)]
[ORC] Call ExecutorProcessControl::disconnect in unit tests that require it.
Another follow-up to
2815ed57e3c and
19b4e3cfc6a. For unit tests that don't use
an ExecutionSession we need to call ExecutorProcessControl::disconnect directly
to wait for the dispatcher to shut down.
https://llvm.org/PR52153
Artem Belevich [Tue, 12 Oct 2021 18:18:30 +0000 (11:18 -0700)]
[CUDA] Provide address space conversion builtins.
CUDA-11 headers rely on these NVCC builtins.
Despite having `__nv` previx, those are *not* provided by libdevice.
Differential Revision: https://reviews.llvm.org/D111665
Lang Hames [Tue, 12 Oct 2021 21:27:39 +0000 (14:27 -0700)]
[ORC] Call ExecutionSession::endSession in unit tests.
2815ed57e3c added calls from ExecutorProcessControl::disconnect implementations
to shut down the TaskDispatcher. We still need to call endSession to trigger
disconnection though. This commit adds the necessary calls to the failing unit
tests.
https://llvm.org/PR52153
Arthur Eubanks [Mon, 11 Oct 2021 20:29:58 +0000 (13:29 -0700)]
[clang] Teardown new PM data structures before running codegen pipeline
Do this by refactoring the optimization and codegen pipelines into separate functions.
This saves a tiny bit of memory in non-LTO builds [1].
[1] https://llvm-compile-time-tracker.com/compare.php?from=
fbddf22ef72d3c2e9b14e1501841b03380eef12b&to=
cd276df52eb6f2b84a8e1efe5318460c6debf82d&stat=max-rss
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D111582
Vitaly Buka [Tue, 12 Oct 2021 01:33:48 +0000 (18:33 -0700)]
[NFC][sanitizer] Clang-format a line
Depends on D111608.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111609
Vitaly Buka [Tue, 12 Oct 2021 21:09:49 +0000 (14:09 -0700)]
[sanitizer] Re-enable test on Windows
It's likely missdiagnosed issue fixed with
336e88636a99c18a4747cb06ad1bc9b590901482
Diego Caballero [Tue, 12 Oct 2021 20:46:08 +0000 (20:46 +0000)]
[mlir][Linalg] Enable vectorization of 'mul', 'and', 'or' and 'xor' reductions
This patch adds support for vectorizing 'mul', 'and', 'or' anx 'xor' reductions
to Linalg.
Reviewed By: pifon2a, ThomasRaoux, aartbik
Differential Revision: https://reviews.llvm.org/D111565
Diego Caballero [Tue, 12 Oct 2021 20:58:06 +0000 (20:58 +0000)]
[mlir][Linalg] Enable vectorization of explicit broadcasts
This patch teaches `isProjectedPermutation` and `inverseAndBroadcastProjectedPermutation`
utilities to deal with maps representing an explicit broadcast, e.g., (d0, d1) -> (d0, 0).
This extension is needed to enable vectorization of such explicit broadcast in Linalg.
Reviewed By: pifon2a, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111563
Nico Weber [Tue, 12 Oct 2021 21:03:22 +0000 (17:03 -0400)]
[lld] fix typos to cycle bots
Jean Perier [Tue, 12 Oct 2021 21:00:23 +0000 (23:00 +0200)]
[fir] Add cfg conversion pass
This patch upstream the cfg conversion pass. This pass
rewrite FIR loop-like operation to a CFG.
This patch is part of the upstreaming effort from fir-dev branch.
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
Co-authored-by: Valentin Clement <clementval@gmail.com>
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D111095
Vitaly Buka [Tue, 12 Oct 2021 18:41:45 +0000 (11:41 -0700)]
[NFC][sanitizer] Move consts into on top of the class
Vitaly Buka [Mon, 11 Oct 2021 08:35:43 +0000 (01:35 -0700)]
[sanitizer] Switch StackDepot to TwoLevelMap
Depends on D111607.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111608
Philip Reames [Tue, 12 Oct 2021 20:45:11 +0000 (13:45 -0700)]
[instcombine] propagate freeze through single use poison producing flag instruction
If we have an instruction which produces poison only when flags are specified on the instruction, then we know that freezing the operands and dropping flags is equivalent to freezing the result. If we know those flags don't result in any undefined behavior being executed, then there's no point in preserving the flags as we gain no knowledge by having them.
This patch extends the existing propagation logic which sinks freeze to single potential non-poison operands to allow dropping of flags when we know the freeze is the sole use of the instruction with poison flags.
The main value is that we tend to sink freezes towards the phi in IV cycles where the incoming value to the phi is the freeze of an IV increment. This will in turn (in a future patch), let us fold the freeze through the phi into the loop preheader. Motivated by eliminating need for CanonicalizeFreezeInLoops for the clearly profitable cases from onephi.ll test case in the test directory.
Differential Revision: https://reviews.llvm.org/D111675
Vitaly Buka [Sun, 10 Oct 2021 06:27:39 +0000 (23:27 -0700)]
[sanitizer] Remove SpinMutexLock from stat function
Mapped size is more appropriate for most users.
Depends on D111605.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111607
Albion Fung [Tue, 12 Oct 2021 20:47:44 +0000 (15:47 -0500)]
[PowerPC] Emit dcbt and dcbtst in place of their extended mnemonics on AIX
On AIX, the system assembler does not support the extended mnemonics
dcbtt and dcbtstt. This patch stops them from being emitted on
AIX and emits the base mnemonics instead, dcbt X, X, 16 and
dcbtstt X, X, 16 respectively.
Differential revision: https://reviews.llvm.org/D111258
Lang Hames [Tue, 12 Oct 2021 20:24:54 +0000 (13:24 -0700)]
[ORC] Shut down dispatcher in ExecutorProcessControl implementations.
f3411616896 added a task dispatcher for async handlers, but didn't add a
TaskDispatcher::shutdown call to SelfExecutorProcessControl or SimpleRemoteEPC.
This patch adds the missing call, which ensures that we don't destroy the
dispatcher while tasks are still running.
This should fix the use-after-free crash seen in
https://lab.llvm.org/buildbot/#/builders/5/builds/13063
Vitaly Buka [Mon, 11 Oct 2021 03:15:45 +0000 (20:15 -0700)]
[NFC][sanitizer] Refactor Maps into templates
Depends on D111599.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111605
Philip Reames [Tue, 12 Oct 2021 20:37:04 +0000 (13:37 -0700)]
Add extra tests for D111675
Vitaly Buka [Tue, 12 Oct 2021 20:17:55 +0000 (13:17 -0700)]
[sanitizer] Fix test on Windows
UL suffix on MSVC is 32bit.
Vitaly Buka [Tue, 12 Oct 2021 19:48:12 +0000 (12:48 -0700)]
[sanitizer] Fix typo in test
Roland Froese [Tue, 12 Oct 2021 20:11:34 +0000 (20:11 +0000)]
[PowerPC] Simplify PPC codegen test pre-inc-disable.ll
Simplify the test case to make it easier to look at. Change from auto-generated
checks to targeted manual checks to reduce sensitivity to register allocation
and scheduling changes.
Differential Revision: https://reviews.llvm.org/D111333
Rob Suderman [Tue, 12 Oct 2021 20:02:29 +0000 (13:02 -0700)]
[mlir][tosa] Fix tosa average_pool2d to linalg type issue
Average pool assumed the same input/output type. Result type for integers
is always an i32, should be updated appropriately.
Reviewed By: GMNGeoffrey
Differential Revision: https://reviews.llvm.org/D111590
David Blaikie [Tue, 12 Oct 2021 19:26:24 +0000 (12:26 -0700)]
DebugInfo: Add test coverage for non-zero addrx in DW_FORM_LLVM_addrx_offset
Noticed in code review
https://github.com/llvm/llvm-project/commit/
4318028cd2d7633a0cdeb0b5d4d2ed81fab87864#commitcomment-
57738034
But the issue had already been fixed in
943b3048484b7e3cf04f4d51c23c82fcece2185d due to a code checking tool
(PVS studio) identification, but that lacked test coverage.
Refactor this test a little bit too by using more CHECK-SAME to help the
checks fail sooner (rather than, if the addrx or sizes are wrong, having
that check bind to a much later output line - and then fail due to the
implicit-check-nots, which don't provide a lot of information about
where the intended check was likely to land) & more informatively.
David Blaikie [Mon, 11 Oct 2021 19:59:26 +0000 (12:59 -0700)]
DebugInfo: Update ranges_always.ll to include more details about how to generate the IR
Also modify the test to be more robust (current IR generation doesn't
include call sites for callees that are only declared but not defined -
so the test case couldn't be regenerated - add a function definition (&
optnone attribute) so it doesn't depend on call sites for
declared-but-not-defined functions)
peter klausler [Tue, 12 Oct 2021 18:50:26 +0000 (11:50 -0700)]
[flang] Fix build on FreeBSD (need size_t)
Add #include <cstddef> to time-intrinsic.h so std::size_t is
guaranteed to be available.
Jacques Pienaar [Tue, 12 Oct 2021 19:45:57 +0000 (12:45 -0700)]
[mlir][python] Add nameloc getter
Expose the nameloc getter to Python API.
Differential Revision: https://reviews.llvm.org/D111663
Philip Reames [Tue, 12 Oct 2021 19:01:36 +0000 (12:01 -0700)]
[tests] Add coverage for cases we can drop flags to propagate freeze without cost
Ayal Zaks [Sun, 29 Aug 2021 22:24:21 +0000 (01:24 +0300)]
[LV] Fix 2nd crash for reverse interleaved groups under mask/fold-tail.
This patch fixes another crash revealed by PR51614:
when *deciding* to vectorize with masked interleave groups, check if the access
is reverse (which is currently not supported).
Differential Revision: https://reviews.llvm.org/D108900
Amara Emerson [Mon, 11 Oct 2021 06:38:34 +0000 (23:38 -0700)]
[GlobalISel] Add support for constant vector folding of binops in CSEMIRBuilder.
Differential Revision: https://reviews.llvm.org/D111524
Arthur Eubanks [Mon, 11 Oct 2021 21:45:34 +0000 (14:45 -0700)]
Remove checks for old gcc versions for LLVM_ATTRIBUTE_*
According to [1] we only support gcc 5.1+. So these checks for older gcc versions are not supported.
Some gcc 5.1+ versions still don't support __has_builtin, so just check __GNUC__ in those cases.
Add a missing #endif for LLVM_ATTRIBUTE_UNREACHABLE.
[1] https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D111581
Michael Jones [Mon, 11 Oct 2021 22:11:39 +0000 (22:11 +0000)]
[libc] Add strncat and fix strcat
This adds strncat to llvm libc. In addition, an error was found with
strcat and that was fixed.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D111583
Tobias Gysi [Tue, 12 Oct 2021 17:43:47 +0000 (17:43 +0000)]
[mlir][linalg] Enable the vector transfer lowering by default.
Adapt CodegenStartegy to used the vector transfer lowering patterns by default.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111649
Vitaly Buka [Tue, 12 Oct 2021 04:29:06 +0000 (21:29 -0700)]
[sanitizer] Fix StackDepotPrintAll
unlock corrupted backets by using s set by loop to nullptr.
Also StackDepot supports iterating without locking.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D111599
William Woodruff [Tue, 12 Oct 2021 17:47:10 +0000 (23:17 +0530)]
[docs] [NFC] Clarify the datalayout documentation
This patch fixes a couple of small oversights in the documentation for
the datalayout specification:
* The v and f specifications are subject to the same constraints on <size>
as i is.
* The p[n] specification didn't mark <idx> as optional, despite
being documented and parsed as such.
* Similarly, none of the alignment specifications require <pref>.
Kevin P. Neal [Tue, 12 Oct 2021 17:42:58 +0000 (13:42 -0400)]
[FPEnv][InstSimplify] Precommit tests: Enable more folds for constrained fsub
Precommit tests for D107285 as requested. TODO notes left at individual
functions also as requested.
Mircea Trofin [Mon, 11 Oct 2021 23:43:28 +0000 (16:43 -0700)]
[Inline] Make sure the InlineAdvisor is correctly cleared.
If another inlining session came after a ModuleInlinerWrapperPass, the
advisor alanysis would still be cached, but its Result would be cleared.
We need to clear both.
This addresses PR52118
Differential Revision: https://reviews.llvm.org/D111586
Artem Dergachev [Tue, 12 Oct 2021 17:19:35 +0000 (10:19 -0700)]
[analyzer] Fix non-obvious analyzer warning: Use of zero-allocated memory.
Clarify the message provided when the analyzer catches the use of memory
that is allocated with size zero.
Differential Revision: https://reviews.llvm.org/D111655
LLVM GN Syncbot [Tue, 12 Oct 2021 17:32:05 +0000 (17:32 +0000)]
[gn build] Port
9cf995be6bb7
LLVM GN Syncbot [Tue, 12 Oct 2021 17:32:04 +0000 (17:32 +0000)]
[gn build] Port
838b4a533e68
Nico Weber [Tue, 12 Oct 2021 17:31:50 +0000 (13:31 -0400)]
[gn build] (manually) port
67f94e5a9745
Nico Weber [Mon, 11 Oct 2021 18:26:09 +0000 (14:26 -0400)]
[clang/CFG] Don't explicitly add AttributedStmtClass to AlwaysAddList
CFGBuilder::addStmt() implicitly passes AddStmtChoice::AlwaysAdd
to Visit() already, so this should have no behavior change.
Differential Revision: https://reviews.llvm.org/D111570
Roman Lebedev [Tue, 12 Oct 2021 17:24:17 +0000 (20:24 +0300)]
[X86] `detectAVGPattern()`: don't require zext in the with-constant case
Roman Lebedev [Tue, 12 Oct 2021 17:19:18 +0000 (20:19 +0300)]
[NFC][X86] Add another test case for PR52131
Lang Hames [Tue, 12 Oct 2021 16:48:29 +0000 (09:48 -0700)]
[Support][ORC] Add an explicit release operation to OwningMemoryBlock.
This gives OwningMemoryBlock clients a way to check for errors on release.
rdar://
84127175
Roman Lebedev [Tue, 12 Oct 2021 17:11:45 +0000 (20:11 +0300)]
[NFC][X86] `detectAVGPattern()`: rely on `AVGSplitter()` to perform truncation
Benjamin Kramer [Tue, 12 Oct 2021 16:01:54 +0000 (18:01 +0200)]
[mlir][Shape] Add a pattern to turn extract from shape_of into tensor.dim
If I remember correctly this wasn't done previously because dim used to
be in the memref dialect.
Differential Revision: https://reviews.llvm.org/D111651
Stanislav Mekhanoshin [Fri, 8 Oct 2021 20:04:32 +0000 (13:04 -0700)]
[AMDGPU] Promote generic pointer kernel arguments into global
The new pass walks kernel's pointer arguments, then loads from them.
If a loaded value is a pointer and loaded pointer is unmodified in
the kernel before the load, then promote loaded pointer to global.
Then recursively continue.
Differential Revision: https://reviews.llvm.org/D111464
Sanjay Patel [Tue, 12 Oct 2021 16:18:29 +0000 (12:18 -0400)]
[InstCombine] propagate no-wrap flag through select-of-mul fold
This may not be obvious, but Alive2 agrees:
https://alive2.llvm.org/ce/z/Ld9qNT
If the mul has "nsw", then -1 * INT_MIN is poison, so the
negate can also have "nsw" because 0 - INT_MIN is poison.
If the mul has "nuw", then that means the "OtherOp" can only
be 0 or 1 (anything else multiplied by 0xfff... would wrap).
So the replacement negate must be "nsw" because it is either
"0-0" or "0-1".
This is another regression noticed with a planned follow-up
to D111410.
Sanjay Patel [Tue, 12 Oct 2021 15:47:03 +0000 (11:47 -0400)]
[InstCombine] add tests with nsw/nuw for mul-of-select; NFC
Roman Lebedev [Tue, 12 Oct 2021 16:43:51 +0000 (19:43 +0300)]
[X86] `detectAVGPattern()`: support basic case of PAVG chaining (PR52131)
As noted in https://github.com/halide/Halide/pull/6302,
we hilariously fail to match PAVG if we even as much
as look at it the wrong way.
In this particular case, the problem stems from the fact that
`PAVG` root (def) is a `trunc`, and leafs (uses) are `zext`'s,
and InstCombine really loves to get rid of both of these,
for example replace them with a bit mask. So we may not have
said `zext`.
Instead of checking for that + type match,
i think we should rely on the actual active type,
as per the knownbits.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D111571
Roman Lebedev [Tue, 12 Oct 2021 16:42:24 +0000 (19:42 +0300)]
[X86] `detectAVGPattern()`: small preparatory NFC refactor
Nimish Mishra [Tue, 12 Oct 2021 16:44:21 +0000 (22:14 +0530)]
Added OpenMP 5.0 specification based semantic checks for CRITICAL construct name resolution
As reported in https://bugs.llvm.org/show_bug.cgi?id=48145, name resolution for omp critical construct was failing. This patch adds functionality to help that name resolution as well as implementation to catch name mismatches.
The following semantic restrictions are therefore handled here:
- If a name is specified on a critical directive, the same name must also be specified on the end critical directive
- If no name appears on the critical directive, no name can appear on the end critical directive
- If a name appears on either the start critical directive or the end critical directive
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D110502
Hongtao Yu [Thu, 30 Sep 2021 16:13:41 +0000 (09:13 -0700)]
[CSSPGO] Unblock optimizations with pseudo probe instrumentation part 3.
This patch continues unblocking optimizations that are blocked by pseudo probe instrumentation.
Not exactly like DbgIntrinsics, PseudoProbe intrinsic has other attributes (such as mayread, maywrite, mayhaveSideEffect) that can block optimizations. The issues fixed are:
- Flipped default param of getFirstNonPHIOrDbg API to skip pseudo probes
- Unblocked CSE by avoiding pseudo probe from clobbering memory SSA
- Unblocked induction variable simpliciation
- Allow empty loop deletion by treating probe intrinsic isDroppable
- Some refactoring.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D110847
peter klausler [Wed, 6 Oct 2021 21:03:48 +0000 (14:03 -0700)]
[flang] More work on SYSTEM_CLOCK runtime API and implementation
To get proper wrap-around behavior for the various kind parameter
values of the optional COUNT= and COUNT_MAX= dummy arguments to
the intrinsic subroutine SYSTEM_CLOCK, add an extra argument to
the APIs for lowering to pass the integer kind of the actual argument.
Avoid confusion by requiring that both actual arguments have the same
kind when both are present. The results of the runtime functions
remain std::int64_t and lowering should still convert them before
storing to the actual argument variables.
Rework the implementation a bit to accomodate the dynamic
specification of the kind parameter, and to clean up some coding
issues with preprocessing and templates.
Use the kind of the COUNT=/COUNT_MAX= actual arguments to determine
the clock's resolution, where possible, in conformance with other
Fortran implementations.
Differential Revision: https://reviews.llvm.org/D111281
Kazu Hirata [Tue, 12 Oct 2021 16:19:48 +0000 (09:19 -0700)]
[AST, CodeGen, Driver] Use llvm::is_contained (NFC)
Craig Topper [Tue, 12 Oct 2021 15:46:08 +0000 (08:46 -0700)]
[TableGen] Fix both sides of '&&' are same
The operand of the second any_of in EnforceSmallerThan should be
B not S like the FP code in the if below.
Unfortunately, fixing that causes an infinite loop in the build
of RISCV. So I've added a workaround for that as well.
Fixes PR44768.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D111502
Saiyedul Islam [Sat, 9 Oct 2021 12:06:11 +0000 (12:06 +0000)]
[Clang][clang-nvlink-wrapper] Pass nvlink path to the wrapper
Added support of a "--nvlink-path" option in clang-nvlink-wrapper which
takes the path of nvlink binary.
Static Device Library support for OpenMP (D105191) now searches for
nvlink binary and passes its location via this option. In absence
of this option, nvlink binary is searched in locations in PATH.
Differential Revision: https://reviews.llvm.org/D111488
Mark de Wever [Sun, 10 Oct 2021 13:18:46 +0000 (15:18 +0200)]
[libc++] Use addressof to fix debug tests.
Fixes the tests added in D110852 for the debug iterators.
Similar issues with hijacking `operator&` still exist, they will be
addressed separately.
Reviewed By: #libc, ldionne, Quuxplusone
Differential Revision: https://reviews.llvm.org/D111564
Jeremy Morse [Tue, 12 Oct 2021 16:05:51 +0000 (17:05 +0100)]
Scatter NDEBUG to fix after
838b4a533e6
These "dump" methods call into MachineOperand::dump, which doesn't exist
with NDEBUG, thus we croak. Disable LiveDebugValues dump methods when
NDEBUG is turned on to avoid this.
David Tenty [Tue, 12 Oct 2021 15:53:12 +0000 (11:53 -0400)]
[libcxx][AIX] Explicitly include localedef.h in locale.cpp
This header was transitively included to provide the definition of
__lc_ctype_ptr that we use on AIX, but that is fragile as it depends on
the settings of compatibility macros, so we explicitly include it here
to avoid that scenario.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D111239
Aart Bik [Tue, 12 Oct 2021 00:11:13 +0000 (17:11 -0700)]
[mlir][sparse] add action enum, group enums together, few asserts
Some random changes that were hanging around in my workspace. Also,
a tiny step towards creating a header file for the sparse utils lib.
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D111589
Lei Zhang [Tue, 12 Oct 2021 15:39:56 +0000 (11:39 -0400)]
[mlir][vector] Add folder for no-op InsertStridedSliceOp
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111636
Mike Urbach [Mon, 11 Oct 2021 23:23:42 +0000 (16:23 -0700)]
[mlir] Limit Python dependency to Development.Module when possible.
After CMake 3.18, we are able to limit the scope of the search to just
Development.Module. Searching for Development will fail in situations
where the Python libraries are not available. When possible, limit to
just Development.Module. See:
https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode
Reviewed By: stellaraccident
Differential Revision: https://reviews.llvm.org/D111585
Mark de Wever [Sun, 6 Jun 2021 12:48:08 +0000 (14:48 +0200)]
[libc++] Update atomic synopsis and tests.
While looking at LWG-2988 and P0558 it seems the issues were already
implemented, but the synopsis wasn't updated. Some of the tests didn't
validate the `noexcept` status. A few tests were missing completely:
- `atomic_wait_explicit`
- `atomic_notify_one`
- `atomic_notify_all`
Mark P0558 as complete, didn't investigate which version of libc++ first
includes this. It seems the paper has been retroactively applied. I
couldn't find whether this is correct, but looking at cppreference it
seems intended.
Completes
- LWG-2988 Clause 32 cleanup missed one typename
- P0558 Resolving atomic<T> named base class inconsistencies
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D103765
Martin Storsjö [Fri, 27 Aug 2021 10:09:19 +0000 (10:09 +0000)]
[libcxx] [test] Make windows triples in XFAILs less specific
This allows picking up on mingw triples that often use 'w64' instead
of 'pc' as the vendor part.
Differential Revision: https://reviews.llvm.org/D111297
Jay Foad [Tue, 12 Oct 2021 15:19:35 +0000 (16:19 +0100)]
Revert "[AMDGPU] Enable load clustering in the post-RA scheduler"
This reverts commit
66e13c7f439cf162d7ed1d25883e71a5755ac7ec.
It was committed by accident.
Jay Foad [Tue, 12 Oct 2021 08:15:07 +0000 (09:15 +0100)]
[TwoAddressInstruction] Remove ad hoc machine verification
With the -early-live-intervals command line flag,
TwoAddressInstructionPass::runOnMachineFunction would call
MachineFunction::verify before returning to check the live intervals.
But there was not much benefit to doing this since -verify-machineinstrs
and LLVM_ENABLE_EXPENSIVE_CHECKS provide a more general way of
scheduling machine verification after every pass.
Also it caused problems on targets like Lanai which are marked as "not
machine verifier clean", since verification would fail for known
target-specific problems which are nothing to do with LiveIntervals.
Differential Revision: https://reviews.llvm.org/D111618
Jay Foad [Tue, 12 Oct 2021 14:39:43 +0000 (15:39 +0100)]
[AMDGPU] Enable load clustering in the post-RA scheduler
This has a couple of benefits:
1. It can sometimes fix clusters that got broken apart when the register
allocator inserted a copy.
2. Post-RA scheduling does not have to worry about increasing register
pressure, which in some cases gives it more freedom to reorder
instructions.
Testing on a collection of 10,000 graphics shaders compiled for gfx1010
showed:
- The average length of each run of one or more load instructions
increased by about 1%.
- The number of runs of two or more load instructions increased by
about 4%.
Jeremy Morse [Tue, 12 Oct 2021 14:55:46 +0000 (15:55 +0100)]
[DebugInfo][NFC] Move LiveDebugValues class to header
This patch shifts the InstrRefBasedLDV class declaration to a header.
Partially because it's already massive, but mostly so that I can start
writing some unit tests for it. This patch also adds the boilerplate for
said unit tests.
Differential Revision: https://reviews.llvm.org/D110165
Tobias Gysi [Tue, 12 Oct 2021 14:53:33 +0000 (14:53 +0000)]
[mlir][linalg] Add switch to disable/enable vector transfer lowering.
Add a switch to code gen strategy to disable/enable the vector transfer lowering and disable it by default.
Differential Revision: https://reviews.llvm.org/D111647
Bradley Smith [Tue, 5 Oct 2021 12:20:58 +0000 (12:20 +0000)]
[AArch64][SVE] Add fixed type lowering for EXTRACT_SUBVECTOR
Depends on D111135
Differential Revision: https://reviews.llvm.org/D111165
Nathan Sidwell [Fri, 21 May 2021 18:34:23 +0000 (11:34 -0700)]
[clang] p0388 array list initialization overloads
This is the second part of p0388, dealing with overloads of list
initialization to incomplete array types. It extends the handling
added in D103088 to permit incomplete arrays. We have to record that
the conversion involved an incomplete array, and so (re-add) a bit flag
into the standard conversion sequence object. Comparing such
conversion sequences requires knowing (a) the number of array elements
initialized and (b) whether the initialization is of an incomplete array.
This also updates the web page to indicate p0388 is implemented (there
is no feature macro).
Differential Revision: https://reviews.llvm.org/D103908
Nathan Sidwell [Thu, 20 May 2021 20:31:31 +0000 (13:31 -0700)]
[clang] p0388 conversion to incomplete array
This implements the new implicit conversion sequence to an incomplete
(unbounded) array type. It is mostly Richard Smith's work, updated to
trunk, testcases added and a few bugs fixed found in such testing.
It is not a complete implementation of p0388.
Differential Revision: https://reviews.llvm.org/D102645
Balázs Kéri [Tue, 12 Oct 2021 14:43:16 +0000 (16:43 +0200)]
[clang-tidy] Update documentation of check bugprone-unused-return-value [NFC].
The list of checked functions was incomplete in the description.
Reviewed By: aaron.ballman, steakhal
Differential Revision: https://reviews.llvm.org/D111623
Tobias Gysi [Tue, 12 Oct 2021 13:50:25 +0000 (13:50 +0000)]
[mlir][linalg] Add vector transfer lowering patters to codegen strategy.
Add the vector transfer patterns and introduce the max transfer rank option on the codegen strategy.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D111635
Siger Yang [Tue, 12 Oct 2021 14:08:05 +0000 (22:08 +0800)]
[lldb/lua] Supplement Lua bindings for lldb module
Add necessary typemaps for Lua bindings, together with some other files.
Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Reviewed By: tammela
Differential Revision: https://reviews.llvm.org/D108090
Carlos Galvez [Tue, 12 Oct 2021 14:05:43 +0000 (10:05 -0400)]
Remove 'IgnoreDestructors = true' from cppcoreguidelines-explicit-virtual-functions
This requirement was introduced in the C++ Core guidelines in 2016:
https://github.com/isocpp/CppCoreGuidelines/commit/
1894380d0abf4d7d49a983005647e0d41ecbf214
Then clang-tidy got updated to comply with the rule.
However in 2019 this decision was reverted:
https://github.com/isocpp/CppCoreGuidelines/commit/
5fdfb20b760c5307bf86873798a146fcd7e912e6
Therefore we need to apply the correct configuration to
clang-tidy again.
This also makes this cppcoreguidelines check consistent
with the other 2 alias checks: hicpp-use-override and
modernize-use-override.
Additionally, add another RUN line to the unit test,
to make sure cppcoreguidelines-explicit-virtual-functions
is tested.
Ahsan Saghir [Mon, 13 Sep 2021 01:48:48 +0000 (20:48 -0500)]
[PowerPC] Allow MMA built-ins to accept restrict and volatile qualified pointers
This patch allows MMA built-ins on PowerPC to accept restrict
and volatile qualified pointers.
Reviewed By: #powerpc, nemanjai
Differential Revision: https://reviews.llvm.org/D106550
Hans Wennborg [Tue, 12 Oct 2021 13:51:01 +0000 (15:51 +0200)]
Add self to .mailmap
Siger Yang [Tue, 12 Oct 2021 13:02:21 +0000 (21:02 +0800)]
[lldb/lua] Force Lua version to be 5.3
Due to CMake cache, find_package in FindLuaAndSwig.cmake
will be ignored. This commit adds EXACT and REQUIRED flags
to it and removes find_package in Lua ScriptInterpreter.
Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Reviewed By: tammela, JDevlieghere
Differential Revision: https://reviews.llvm.org/D108515
Nicolas Vasilache [Tue, 12 Oct 2021 13:27:41 +0000 (13:27 +0000)]
[mlir][Vector][Bigfix] Fix vector transfer to store lowering to insert a proper ExtractOp
Differential Revision: https://reviews.llvm.org/D111641
Michał Górny [Fri, 20 Aug 2021 10:11:45 +0000 (12:11 +0200)]
[lldb] [gdb-remote] Fix displaying i387_ext & vec regs with gdbserver
Adjust the encoding and format applied to i387_ext and vec* type
registers from gdbserver to match lldb-server. Both types are now
displayed as vector of uint8 instead of float and integer formats used
before. Additionally, this fixes display of STi registers when they do
not carry floating-point data (they are also used to hold MMX vectors).
Differential Revision: https://reviews.llvm.org/D108468
Nico Weber [Mon, 11 Oct 2021 18:19:21 +0000 (14:19 -0400)]
[clang] Omit most AttributedStatements from the CFG
`[[clang::fallthrough]]` has meaning for the CFG, but all other
StmtAttrs we currently have don't. So omit them, as AttributedStatements
with children cause several issues and there's no benefit in including
them.
Fixes PR52103 and PR49454. See PR52103 for details.
Differential Revision: https://reviews.llvm.org/D111568
Nicolas Vasilache [Tue, 12 Oct 2021 12:56:40 +0000 (12:56 +0000)]
mlir][Vector] Fix spuriously disabled test.
Nicolas Vasilache [Tue, 12 Oct 2021 12:39:26 +0000 (12:39 +0000)]
[mlir][Linalg] Refactor and improve vectorization to add support for reduction into 0-d tensors.
This revision takes advantage of the recently added support for 0-d transfers and vector.multi_reduction that return a scalar.
Reviewed By: pifon2a
Differential Revision: https://reviews.llvm.org/D111626
Lei Zhang [Tue, 12 Oct 2021 12:35:16 +0000 (08:35 -0400)]
[mlir][tensor] Add some folders for insert/extract slice ops
* Fold extract_slice immediately after insert_slice.
* Fold overlapping insert_slice.
Reviewed By: ThomasRaoux
Differential Revision: https://reviews.llvm.org/D111439