Kazu Hirata [Mon, 12 Dec 2022 16:27:12 +0000 (08:27 -0800)]
[CodeGen] Fix a warning
This patch fixes:
clang/lib/CodeGen/CGOpenMPRuntime.cpp:6098:8: error: lambda capture
'this' is not used [-Werror,-Wunused-lambda-capture]
Nikita Popov [Mon, 12 Dec 2022 16:13:39 +0000 (17:13 +0100)]
[Clang] Convert some tests to opaque pointers (NFC)
These were tests where update_cc_test_checks.py was rerun after
the conversion.
Nikita Popov [Mon, 12 Dec 2022 16:01:34 +0000 (17:01 +0100)]
[Clang] Convert various tests to opaque pointers (NFC)
These were all tests where no manual fixup was required.
Paul Robinson [Fri, 9 Dec 2022 19:39:20 +0000 (11:39 -0800)]
[lldb] Remove redundant XFAIL
The test is `UNSUPPORTED: system-linux` so the XFAIL for linux is
redundant.
Part of the project to eliminate special handling for triples in lit
expressions.
Differential Revision: https://reviews.llvm.org/D139734
Jakub Kuderski [Mon, 12 Dec 2022 15:54:20 +0000 (10:54 -0500)]
[mlir][arith] Simplify muli emulation with mului_extended
Using `arith.mului_extended` makes it much simpler to emulate wide
integer multiplication.
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D139776
Sanjay Patel [Mon, 12 Dec 2022 15:02:56 +0000 (10:02 -0500)]
[InstCombine] try to fold a pair of insertelements into one insertelement
This replaces patches that tried to convert related patterns to shuffles
(D138872, D138873, D138874 - reverted/abandoned) but caused codegen
problems and were questionable as a canonicalization because an
insertelement is a simpler op than a shuffle.
This detects a larger pattern -- insert-of-insert -- and replaces with
another insert, so this hopefully does not cause any problems.
As noted by TODO items in the code and tests, this could go a lot further.
But this is enough to reduce the motivating test from issue #17113.
Example proofs:
https://alive2.llvm.org/ce/z/NnUv3a
I drafted a version of this for AggressiveInstCombine, but it seems that
would uncover yet another phase ordering gap. If we do generalize this to
handle the full range of potential patterns, that may be worth looking at
again.
Differential Revision: https://reviews.llvm.org/D139668
Michael Platings [Mon, 12 Dec 2022 15:36:06 +0000 (15:36 +0000)]
[clang] Allow using BareMetal toolchain with LLVM_ENABLE_PER_TARGET_RUNTIME_DIR compiler-rt
If you build compiler-rt with LLVM_ENABLE_PER_TARGET_RUNTIME_DIR then
the library filename will be "libclang_rt.builtins.a" instead of
"libclang_rt.builtins-<ARCH>.a"
The ToolChain::getCompilerRT method uses the "libclang_rt.builtins.a"
name if it can find the file in the library directories. If it can't
then it falls back to using "libclang_rt.builtins-<ARCH>.a". This
change adds the library directory such that "libclang_rt.builtins.a"
can be found.
Differential Revision: https://reviews.llvm.org/D139822
Simon Pilgrim [Mon, 12 Dec 2022 15:20:18 +0000 (15:20 +0000)]
[X86] X86TTIImpl::getIntImmCost - use APInt::isInt/isSignedInt directly
Avoid some getSExtValue()/getZExtValue() calls
Hopefully we can remove some of the getBitWidth() constraints as well, as many are just there as a proxy for legal types (albeit assuming x86_64).
Jan Sjodin [Tue, 6 Dec 2022 19:26:50 +0000 (14:26 -0500)]
[OpenMP][OMPIRBuilder] Migrate code to emit target region functions from clang to OMPIRBuilder
This patch moves some of the logic on how to emit target region functions and
adds emitTargetRegionFunction to the OpenMPIRBuilder. Also the
OpenMPOffloadMandatory flag is added to the config.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D139634
Nikita Popov [Mon, 12 Dec 2022 15:24:14 +0000 (16:24 +0100)]
[Clang] Update Profile tests to opaque pointers (NFC)
Carlos Galvez [Thu, 1 Dec 2022 13:15:32 +0000 (13:15 +0000)]
[clang-tidy] Fix a couple additional cases in misc-use-anonymous-namespace only
- Do not analyze header files, since we don't want to promote
using anonymous namespaces there.
- Do not warn about const/constexpr variables, those are implicitly
static in C++ and they don't need to be moved to an anonymous
namespace. Warning about redundant static in general could be
implemented as a standalone check, moving away some of the
functionality from this check.
This check has been introduced in the current release, thus
no mention of this change is needed in the Release Notes.
Differential Revision: https://reviews.llvm.org/D139113
Lei Huang [Mon, 12 Dec 2022 15:02:01 +0000 (10:02 -0500)]
Revert "[scudo] Enable more warnings for standalone build"
This reverts commit
a2b0673dbe5d5d24194fbc33a9b0e21a414fa50b.
Broke ppc sanitizer bot: https://lab.llvm.org/buildbot/#/builders/19/builds/14037
Nikita Popov [Mon, 12 Dec 2022 15:17:28 +0000 (16:17 +0100)]
[Clang] Convert PCH tests to opaque pointers (NFC)
Felipe de Azevedo Piovezan [Thu, 8 Dec 2022 20:08:20 +0000 (15:08 -0500)]
[CodeExtractor] Preserve entire scope of !DIVariables when moving them
When a dbg.value is moved into a new function, the corresponding
variable should have its entire scope chain reparented with the new
function. The current implementation drops the scope chain and replaces
it with a subprogram for the new function.
Differential Revision: https://reviews.llvm.org/D139671
Roman Lebedev [Mon, 12 Dec 2022 15:17:39 +0000 (18:17 +0300)]
[opt] NewPM: `opt -passname` syntax is dead, long live `opt -passes=<pipeline>`!
I've done final pass, and there are no more tests to update.
All other tests (=codegen tests) are using old pass manager.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D139677
Roman Lebedev [Mon, 12 Dec 2022 15:01:57 +0000 (18:01 +0300)]
[SimplifyCFG] `FoldBranchToCommonDest()`: deal with mismatched IV's in PHI's in common successor block
This tries to approach the problem noted by @arsenm:
terrible codegen for `__builtin_fpclassify()`:
https://godbolt.org/z/388zqdE37
Just because the PHI in the common successor happens to have different
incoming values for these two blocks, doesn't mean we have to give up.
It's quite easy to deal with this, we just need to produce a select:
https://alive2.llvm.org/ce/z/000srb
Now, the cost model for this transform is rather overly strict,
so this will basically never fire. We tally all (over all preds)
the selects needed to the NumBonusInsts
Differential Revision: https://reviews.llvm.org/D139275
Christian Kandeler [Wed, 20 Jul 2022 16:05:44 +0000 (18:05 +0200)]
[clangd] Add support for semantic token type "operator"
Also add new modifier for differentiating between built-in and user-
provided operators.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D136594
Nikita Popov [Mon, 12 Dec 2022 14:53:31 +0000 (15:53 +0100)]
[Clang] Convert some OpenMP tests to opaque pointers (NFC)
Guillaume Chatelet [Mon, 12 Dec 2022 15:04:03 +0000 (15:04 +0000)]
Revert D139836 "[Alignment][NFC] Remove deprecated GlobalObject::getAlignment"
This breaks lldb.
This reverts commit
f3f15ca27fbb433ad5a65b1a1e0a071d2e9af505.
Haojian Wu [Mon, 12 Dec 2022 15:00:51 +0000 (16:00 +0100)]
Use std::optional in Tooling/Inclusions.
Sylvain Audi [Thu, 8 Dec 2022 15:42:11 +0000 (10:42 -0500)]
[clang-cl] Ignore #pragma managed/unmanaged
Those 2 pragmas are ignored by MSVC when not compiling with /CLR, which clang doesn't support.
Ignore them in clang -fms-extensions, to avoid -Wunknown-pragma warnings
Differential Revision: https://reviews.llvm.org/D139632
Guillaume Chatelet [Mon, 12 Dec 2022 13:06:56 +0000 (13:06 +0000)]
[Alignment][NFC] Remove deprecated GlobalObject::getAlignment
Differential Revision: https://reviews.llvm.org/D139836
Carlos Galvez [Mon, 12 Dec 2022 14:42:06 +0000 (14:42 +0000)]
[clang-tidy][NFC] Fix compiler warning in GlobListTest.cpp
Zain Jaffal [Thu, 8 Dec 2022 06:21:53 +0000 (08:21 +0200)]
Recommit "[AArch64] Select SMULL for zero extended vectors when top bit is zero"
This is a recommit of
f9e0390751cb5eefbbbc191f851c52422acacab1
The previous commit failed to handle cases where the zero extended operand is an extended `BUILD_VECTOR`.
We don't replace zext with a sext operand to select smull if any operand is `BUILD_VECTOR`
Original commit message:
we can safely replace a `zext` instruction with `sext` if the top bit is zero. This is useful because we can select `smull` when both operands are sign extended.
Reviewed By: fhahn, dmgreen
Differential Revision: https://reviews.llvm.org/D134711
Zain Jaffal [Mon, 12 Dec 2022 13:56:14 +0000 (13:56 +0000)]
Revert "Revert "[AArch64] Select SMULL for zero extended vectors when top bit is zero""
This reverts commit
c07a01c2bb0d1f95689f809fd5be23829e364393.
Guillaume Chatelet [Mon, 12 Dec 2022 14:39:21 +0000 (14:39 +0000)]
[Alignment][NFC] Use Align in Hexagon emit(local)?CommonSymbolSorted
David Green [Mon, 12 Dec 2022 14:35:01 +0000 (14:35 +0000)]
[AArch64][SVE] Add some hadd sve codegen tests. NFC
Nikita Popov [Mon, 12 Dec 2022 13:50:54 +0000 (14:50 +0100)]
[Clang] Convert PowerPC tests to opaque pointers (NFC)
Haojian Wu [Mon, 12 Dec 2022 14:28:34 +0000 (15:28 +0100)]
[include-cleaner] Add a newline at end of the file, NFC
Guillaume Chatelet [Mon, 12 Dec 2022 14:27:55 +0000 (14:27 +0000)]
[Alignment][NFC] Use Align in MCSymbol::declareCommon
Felipe de Azevedo Piovezan [Thu, 8 Dec 2022 18:33:55 +0000 (13:33 -0500)]
[nfc][DebugInfo] Move subprogram rewriting utility to header
This utility will be useful in subsequent patches, as such we expose it
in the DebugInfoMetadata header.
Depends on D139669
Differential Revision: https://reviews.llvm.org/D139670
Guillaume Chatelet [Mon, 12 Dec 2022 13:56:18 +0000 (13:56 +0000)]
[Alignment][NFC] MCSymbol::getCommonAlignment returns MaybeAlign, improve documentation.
This one goes hand in hand with D139819
Reviewed By: courbet
Differential Revision: https://reviews.llvm.org/D139826
Carlos Galvez [Mon, 12 Dec 2022 13:36:29 +0000 (13:36 +0000)]
[clang-tidy][NFC] Simply match processing in misc-use-anonymous-namespace
No need for the templated function "processMatch", since
we can infer the type with llvm:isa.
Haojian Wu [Mon, 12 Dec 2022 12:47:46 +0000 (13:47 +0100)]
[include-cleaner] Include the reference type when printing the SymbolReference.
This information is useful when printing the reference for debugging
purposes.
Differential Revision: https://reviews.llvm.org/D139835
Nikita Popov [Mon, 12 Dec 2022 13:49:32 +0000 (14:49 +0100)]
[Clang] Convert CXX tests to opaque pointers (NFC)
Nikita Popov [Mon, 12 Dec 2022 13:43:14 +0000 (14:43 +0100)]
Revert "[Clang][NFC] Prevent lit tests from matching substrings in current path"
This reverts commit
bb48aa20e761e26226c6f909a07246781d68ba41.
Using placeholders inside CHECK-LABEL is not legal.
Tom Eccles [Mon, 12 Dec 2022 13:31:06 +0000 (13:31 +0000)]
[flang] Match alternative names for crtend in fastmath test
The fastmath test checks that crtfastmath.o is added between crtbeginS.o
and crtendS.o. On some systems, crtend is called crtend.o - match these
too.
Related to https://reviews.llvm.org/D138675
Matthias Springer [Mon, 12 Dec 2022 13:16:41 +0000 (14:16 +0100)]
[mlir][bufferize] Fix typo in EmptyTensorElimination
The structure of the code has changed a while ago and the code was not updated properly.
There is no test case for this because we do currently not have an op
that could trigger this bug.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D139838
Matthias Springer [Mon, 12 Dec 2022 13:16:28 +0000 (14:16 +0100)]
[mlir][bufferize] Implement BufferizableOpInterface for tensor.empty
The op is not bufferizable but should be analyzable (for `EliminateEmptyTensors`, which uses the bufferization infrastructure).
Also improve debugging functionality and error messages.
Also adds a missing pass to the sparse pipeline. (tensor.empty should be replaced with bufferization.alloc_tensor, but it sometimes used to work without depending on how the tensor.empty is used. Now we always fail explicitly.)
Guillaume Chatelet [Mon, 12 Dec 2022 09:44:12 +0000 (09:44 +0000)]
[Alignment][NFC] Use Align in MCSymbol::setCommon
This patch supersedes D138705.
Differential Revision: https://reviews.llvm.org/D139819
Valentin Clement [Mon, 12 Dec 2022 13:04:17 +0000 (14:04 +0100)]
[flang] Perform polymorphic pointer association with runtime call
pointer association to a polymorphic pointer needs to potentially
update the element size in the descriptor. Update the pointer association
to polymoprhic pointer with a runtime call to PointerAssociate.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D139825
Chen Zheng [Mon, 12 Dec 2022 12:59:27 +0000 (12:59 +0000)]
[PowerPC][GISel] add the missing verify option - NFC
Chen Zheng [Sun, 9 Oct 2022 08:45:59 +0000 (08:45 +0000)]
[PowerPC][GISel] support 32 bit load/store
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D135535
Alex Zinenko [Wed, 2 Nov 2022 15:22:43 +0000 (15:22 +0000)]
[mlir] make DiagnosedSilenceableError(LogicalResult) ctor private
Now we have more convenient functions to construct silenceable errors
while emitting diagnostics, and the constructor is ambiguous as it
doesn't tell whether the logical error is silencebale or definite.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D137257
Haojian Wu [Mon, 12 Dec 2022 12:40:36 +0000 (13:40 +0100)]
[clangd] Fix a typo "Features.h" => "Feature.h" in IWYU pragma.
Chen Zheng [Sun, 9 Oct 2022 03:31:00 +0000 (03:31 +0000)]
[PowerPC][GISel] support 64 bit load/store
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D134792
Max Kazantsev [Mon, 12 Dec 2022 12:16:09 +0000 (19:16 +0700)]
[Test] Regenerate checks in turn-to-invariant.ll
Due to changes in update script, it now has 'define' prefix in every check,
which is distracting.
Haojian Wu [Mon, 12 Dec 2022 12:14:24 +0000 (13:14 +0100)]
[clangd] Remove a gest-internal header, NFC
gmock-more-matchers.h is a private header, we should use gmock.h which
is already included in the test.
Simon Pilgrim [Mon, 12 Dec 2022 11:28:22 +0000 (11:28 +0000)]
[llvm-exegesis][X86] Add memory pipe counters to SLM model
There might not be any exposed alu pipe counters for us to measure - but the sum of load/store uop counters seems to give a really good approximation to memory controller usage - even for more complex instructions like cmpxchg
Max Kazantsev [Mon, 12 Dec 2022 12:05:33 +0000 (19:05 +0700)]
[Test] Add some IndVars test with swapped true/false branches
Just to make sure our transforms work correctly with them.
Tom Eccles [Mon, 5 Dec 2022 12:07:51 +0000 (12:07 +0000)]
[mlir] Fix -Wstrict-prototypes warning
These warnings prevent compilation using clang and
-DLLVM_ENABLE_WERROR=On.
Differential revision: https://reviews.llvm.org/D139322
Nicholas Guy [Mon, 12 Dec 2022 12:02:00 +0000 (12:02 +0000)]
[NFC] Removal of complex deinterleaving i64 test cases
The tests in question are not particularly useful for testing complex
deinterleaving, especially due to i64 complex adds not being supported in mve.
The tests are being removed as they are hitting an unrelated pre-existing
condition regarding register spilling.
Nicholas Guy [Thu, 8 Dec 2022 13:56:38 +0000 (13:56 +0000)]
[ARM][CodeGen] Add integer support for complex deinterleaving
Differential Revision: https://reviews.llvm.org/D139628
Peter Waller [Thu, 8 Dec 2022 11:09:20 +0000 (11:09 +0000)]
[AArch64][SVE][Fixed length] Fix div miscompile
The prior code worked before SVE DIV was enabled 128 bit vectors.
With 128 bit vectors, when run on a 256 bit machine, it would split and
do a signed unpack, but this resulted in one full vector and one empty
vector with a half-sized predicate. The effect was that only half the
elements were treated correctly.
The fix is to bisect the vector, sign extend, do the division, truncate
and then concat.
Fixes #59357.
Differential Revision: https://reviews.llvm.org/D139618
Sebastian Neubauer [Mon, 12 Dec 2022 11:28:45 +0000 (12:28 +0100)]
[UpdateTestChecks] Match define for labels
Previously, the label also matched function calls with the function
name, which caused tests to fail because the label matched on the wrong
line.
Add the `define` prefix, so only function defines are matched.
Differential Revision: https://reviews.llvm.org/D139006
Tom Eccles [Mon, 12 Dec 2022 11:28:21 +0000 (11:28 +0000)]
[flang] match alternate names for crtbegin in fastmath test
The fastmath test checks that crtfastmath.o is added between crtbeginS.o
and crtend.o. On some systems the first file is instead called
crtbegin.o - match these too.
Related to https://reviews.llvm.org/D138675
Sameer Sahasrabuddhe [Mon, 12 Dec 2022 11:01:43 +0000 (16:31 +0530)]
[Clang][NFC] Prevent lit tests from matching substrings in current path
Max Kazantsev [Mon, 12 Dec 2022 10:48:42 +0000 (17:48 +0700)]
[IndVars][NFC] Separate creation of condition and replacement in foldExit
It is a preparatory step for further improvements.
Markus Böck [Mon, 12 Dec 2022 10:45:31 +0000 (11:45 +0100)]
[sanitizers][windows] Correctly override functions with backward jmps
To reproduce: Download and run the latest Firefox ASAN build (https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.latest.firefox.win64-asan-opt/artifacts/public/build/target.zip) on Windows 11 (version 10.0.22621 Build 22621); it will crash on launch. Note that this doesn't seem to crash on another Windows 11 VM I've tried, so I'm not sure how reproducible it is across machines, but it reproduces on my machine every time.
The problem seems to be that when overriding the memset function in OverrideFunctionWithRedirectJump(), the relative_offset is stored as a uptr. Per the Intel x64 instruction set reference (https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf - warning: large PDF), on page 646 the jmp instruction (specifically the near jump flavors that start with E9, which are the ones the OverrideFunctionWithRedirectJump() considers) treats the offset as a signed displacement. This causes an incorrect value to be stored for REAL(memset) which points to uninitialized memory, and a crash the next time that gets called.
The fix is to simply treat that offset as signed. I have also added a test case.
Fixes https://github.com/llvm/llvm-project/issues/58846
Differential Revision: https://reviews.llvm.org/D137788
Simon Pilgrim [Mon, 12 Dec 2022 10:42:51 +0000 (10:42 +0000)]
Fix mismatch in kate !bang operator list
Differential Revision: https://reviews.llvm.org/D139642
Dmitry Vyukov [Sun, 11 Dec 2022 09:37:46 +0000 (10:37 +0100)]
sanmd: improve precision of UAR analysis
Only mark functions that have address-taken locals
as requiring UAR checking.
On a large internal app this reduces number of marked functions
from 78441 to 66618. Mostly small, trivial getter/setter-type
functions are unmarked, but also some amount of larger
number-crunching-type functions are unmarked as well.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D139811
Max Kazantsev [Mon, 12 Dec 2022 10:01:03 +0000 (17:01 +0700)]
[IndVars][NFC] Separate invariant condition creation and cond replacement
This separation is a preparatory step for further improvements in this code.
Also simplifies this function's API.
Nicolas Vasilache [Mon, 12 Dec 2022 10:13:54 +0000 (02:13 -0800)]
[mlir][Transform] NFC - Return omitted loop construct in transform.tile_reduction_xxx ops
Sameer Sahasrabuddhe [Mon, 12 Dec 2022 08:20:52 +0000 (13:50 +0530)]
Revert "[AAPointerInfo] track multiple constant offsets for each use"
Assertion fired in openmp-offload-amdgpu-runtime:
https://lab.llvm.org/buildbot/#/builders/193/builds/23177
This reverts commit
c2a0baad1fbb21fe111fef83ec93c2d7923b9b0c.
Andrzej Warzynski [Wed, 19 Oct 2022 17:04:31 +0000 (17:04 +0000)]
[MLIR] Vectorize tensor.extract on n-D tensor (n >= 2)
This patch implements the vectorization of tensor.extract for arbitrary
tensors. It basically extends https://reviews.llvm.org/D133786 by adding
support for n-D tensors (n >= 2). This is implemented by essentially
flattening the indices.
When benchmarking the vectorized code, we have observed that it is
slower than the scalar code. That's most likely due to sub-optimal (and,
in general slow) gather loads. More work is needed to identify an
implementation and/or a representation that would lead to better code.
In the meantime, the vectorization of n-D tensors (where n >= 2) has to
be explicitly enabled. This can be done either via:
* transfer dialect's `vectorize_nd_extract` attribute,
* dedicated bool argument in the `vectorize` method from
"Vectorization.cpp".
The second option was added to control the new functionality through
means other than the transfer dialect.
Related discussion: https://github.com/iree-org/iree/issues/9198
Differential Revision: https://reviews.llvm.org/D137660
Max Kazantsev [Mon, 12 Dec 2022 08:21:33 +0000 (15:21 +0700)]
[IndVars][NFC] Remove redundant param in optimizeLoopExitWithUnknownExitCount
There was a crippled version of this transform for Inverted predicate, so the same
query was done twice. Advanced version of this transform wasn't implemented for
inverted condition. Thus, the code was hard to read. The only real purpose of the
Inverted param was to make a simple isKnownPredicateAt query.
Instead if this, use evaluatePredicateAt to solve the task for both inverted and
non-inverted predicate. This slightly changes the order of queries, but effectively
it should save some time by avoiding duplicating queries, and simplifies the code a lot.
I also could not find any evidence that we ever eliminate anything with Inverted = true,
but conservatively preserved the current behavior. Maybe we can remove it and save
some compile time.
Differential Revision: https://reviews.llvm.org/D139814
Reviewed By: nikic
OCHyams [Mon, 12 Dec 2022 09:18:59 +0000 (09:18 +0000)]
[Assignment Tracking][13/*] Account for assignment tracking in SROA
The Assignment Tracking debug-info feature is outlined in this RFC:
https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir
Split dbg.assign intrinsics into fragments similarly to what SROA already does
for dbg.declares, except that there's many more intrinsics to split. The
function migrateDebugInfo generates new dbg.assigns intrinsic for each part of
a split store.
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D133296
Andrew Browne [Mon, 12 Dec 2022 09:22:05 +0000 (01:22 -0800)]
Fix
5bb06c7cce6bdcffb3ced29fa733c0dbb1b63c41 build on windows.
```
C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\lib\Transforms\Instrumentation\DataFlowSanitizer.cpp(1062,37): error: call to constructor of 'llvm::APInt' is ambiguous
llvm::APInt(32, dbgloc.getLine(), false));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include\llvm/ADT/APInt.h(108,3): note: candidate constructor
APInt(unsigned numBits, uint64_t val, bool isSigned = false)
^
C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include\llvm/ADT/APInt.h(134,3): note: candidate constructor
APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
^
1 error generated.
```
gonglingqin [Mon, 12 Dec 2022 09:13:52 +0000 (17:13 +0800)]
[LoongArch] Test CodeGen/LoongArch/intrinsic-la32.c with -O2. NFC.
To avoid excessive redundancy in test cases, use -O2 instead of -O0
for testing.
Alex Zinenko [Tue, 6 Dec 2022 14:17:33 +0000 (15:17 +0100)]
[mlir] fixes to transform::SequenceOp
Harden the verifier to check that the block argument type matches the
operand type, when present. This was overlooked when transform dialect
types were introduced.
Fix the builders to preserve the insertion point before creating the
block, otherwise the insertion point is updated to be within the block
by `createBlock` and never reset to be after the sequence op itself,
leading all following operations to be created in the unexpected to
the caller place.
Reviewed By: chelini, springerm
Differential Revision: https://reviews.llvm.org/D139427
Fangrui Song [Mon, 12 Dec 2022 09:11:55 +0000 (09:11 +0000)]
[ProfileData] llvm::Optional => std::optional
Haojian Wu [Mon, 12 Dec 2022 08:52:06 +0000 (09:52 +0100)]
[include-cleaner] Add a unique_ptr-style member expr test in WalkASTTest.
This is a test I missed to mention in https://reviews.llvm.org/D139087.
Reviewed By: VitaNuo
Differential Revision: https://reviews.llvm.org/D139696
Fangrui Song [Mon, 12 Dec 2022 08:56:35 +0000 (08:56 +0000)]
[Transforms/Vectorize] llvm::Optional => std::optional
OCHyams [Mon, 12 Dec 2022 08:39:14 +0000 (08:39 +0000)]
[Assignment Tracking Analysis] Add target triple to test
Build-bot failure: https://lab.llvm.org/buildbot/#/builders/214/builds/4756
Original commit:
1d1de7467c32d52926ca56b9167a2c65c451ecfa
Work-around commit:
34a3259fab86aaa1a20224e08849775f3593e6a3
Nikita Popov [Fri, 9 Dec 2022 14:29:35 +0000 (15:29 +0100)]
[BasicAA] Remove support for PhiValues analysis
BasicAA currently has an optional dependency on the PhiValues
analysis. However, at least with our current pipeline setup, we
never actually make use of it. It's possible that this used to work
with the legacy pass manager, but I'm not sure of that either.
Given that this analysis has not actually been in use for a long
time, and nobody noticed or complained, I think we should drop
support for it and focus on one code path. It is worth noting that
analysis quality for the non-PhiValues case has significantly
improved in the meantime.
If we really wanted to make use of PhiValues, the right way would
probably be to pass it in via AAQI in places we want to use it,
rather than using an optional pass manager dependency (which are
an unpredictable PITA and should really only ever be used for
analyses that are only preserved and not used).
Differential Revision: https://reviews.llvm.org/D139719
LLVM GN Syncbot [Mon, 12 Dec 2022 08:36:01 +0000 (08:36 +0000)]
[gn build] Port
800533283524
David Green [Mon, 12 Dec 2022 08:35:43 +0000 (08:35 +0000)]
[DAGCombine] Fold Splat(bitcast(buildvector(x,..))) to splat(x)
This adds a fold which teaches the backend to fold
splat(bitcast(buildvector(x,..))) or
splat(bitcast(scalar_to_vector(x))) to a single splat.
This only handles lane 0 splats, which are only valid under LE, and
needs to be a little careful with the types it creates for the new
buildvector.
Differential Revision: https://reviews.llvm.org/D139611
Nikita Popov [Fri, 9 Dec 2022 10:57:50 +0000 (11:57 +0100)]
[AA] Remove CFL AA passes
The CFL Steens/Anders alias analysis passes are not enabled by
default, and to the best of my knowledge have no pathway towards
ever being enabled by default. The last significant interest in
these passes seems to date back to 2016. Given the little
maintenance these have seen in recent times, I also have very
little confidence in the correctness of these passes. I don't
think we should keep these in-tree.
Differential Revision: https://reviews.llvm.org/D139703
Pavel Labath [Mon, 12 Dec 2022 08:27:48 +0000 (09:27 +0100)]
[lldb] Modify TestThreadJump to work around a change in clang's debug_line generation
After D133376, jumping to the return line in the otherfn function became
ambiguous because it has two line entries associated with it. Work
around that problem by changing the function. Filed PR59458 to track
possible improvements in jump target disambiguation.
Benjamin Chetioui [Mon, 12 Dec 2022 08:27:29 +0000 (09:27 +0100)]
[mlir] Clean up typos in FileCheck directives in various tests.
Reviewed By: tpopp
Differential Revision: https://reviews.llvm.org/D139698
Fangrui Song [Mon, 12 Dec 2022 08:29:05 +0000 (08:29 +0000)]
Transforms/Utils: llvm::Optional => std::optional
Matthias Springer [Mon, 12 Dec 2022 08:06:41 +0000 (09:06 +0100)]
[mlir][affine] Fix crash in AffineApplyOp canonicalization
This test case used to crash with a failed assertion:
```
AffineExpr.cpp:659 in AffineExpr simplifyMul(AffineExpr, AffineExpr): lhs.isSymbolicOrConstant() || rhs.isSymbolicOrConstant()
```
This was caused by combining two affine maps, which created a multiplication of two non-symbols.
Sameer Sahasrabuddhe [Mon, 12 Dec 2022 08:06:45 +0000 (13:36 +0530)]
[AAPointerInfo] track multiple constant offsets for each use
An expression of the form `gep(base, select(pred, const1, const2))` can result
in a set of offsets instead of just one. PointerInfo can now track these sets
instead of conservatively modeling them as Unknown. In general, AAPointerInfo
now uses AAPotentialConstantValues to examine the operands of the GEP.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D138646
Andrew Browne [Sat, 10 Dec 2022 01:47:54 +0000 (17:47 -0800)]
[DFSan] Add callback that allows to track which function tainted data reaches.
Authored-by: Christopher Liebchen <liebchen@google.com>
Co-authored-by: Andrew Browne <browneee@google.com>
Reviewed By: browneee
Differential Revision: https://reviews.llvm.org/D139543
jacquesguan [Mon, 11 Apr 2022 03:15:15 +0000 (03:15 +0000)]
[DAGCombiner] Scalarize extend/truncate for splat vector.
This revision scalarizes extend/truncate for splat vector.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D122875
River Riddle [Thu, 8 Dec 2022 04:09:28 +0000 (20:09 -0800)]
[mlir] Add LLDB visualizers for MLIR constructs
This commit adds a significant amount of visualizers attempting
to cover the majority of our visualization needs. It covers:
* Operations/OperationName/Ops/OpInterfaces
* Attributes/Types/Attr|TypeInterfaces/NamedAttribute
* Blocks/Regions
* Various range types (e.g. ValueRange/TypeRange)
* Values/BlockArguments/OpResults
This does require an NFC change to interfaces to rename
the concept field to avoid clash with the base class. It
also requires exposing a few method to the debugger
to help resolve information that is non-trivial to reconstruct.
These methods are re-exported using a debug_Blah naming
scheme to avoid messing with hot methods.
Note that this makes use of the new callback feature in lldb-16
(currently trunk) that allows for providing visualizers based on
a dynamic callback, instead of just the typename. It requires
a very new lldb, but allows for providing good default visualization
for all attributes/operations/types out of the box.
Differential Revision: https://reviews.llvm.org/D139602
River Riddle [Mon, 5 Dec 2022 21:29:15 +0000 (13:29 -0800)]
[mlir:Bytecode] Add shared_ptr<SourceMgr> overloads to allow safe mmap of data
The bytecode reader currently has no mechanism that allows for directly referencing
data from the input buffer safely. This commit adds shared_ptr<SourceMgr> overloads
that provide an explicit and safe way of extending the lifetime of the input. The usage of
these new overloads is adopted in all of our tooling, and is implicitly used in the filename
only parser methods.
Differential Revision: https://reviews.llvm.org/D139366
Amir Ayupov [Mon, 12 Dec 2022 06:34:40 +0000 (22:34 -0800)]
[BOLT] Fix broken unittests
Amir Ayupov [Sun, 11 Dec 2022 20:43:26 +0000 (12:43 -0800)]
[BOLT][NFC] Use std::optional in ShrinkWrapping
Amir Ayupov [Sun, 11 Dec 2022 20:41:57 +0000 (12:41 -0800)]
[BOLT][NFC] Use std::optional for readDWARFExpressionTargetReg
Amir Ayupov [Sun, 11 Dec 2022 20:40:06 +0000 (12:40 -0800)]
[BOLT][NFC] Use std::optional in DWARFRewriter
Amir Ayupov [Sun, 11 Dec 2022 20:33:47 +0000 (12:33 -0800)]
[BOLT][NFC] Use std::optional in has*NameRegex
Amir Ayupov [Sun, 11 Dec 2022 20:28:08 +0000 (12:28 -0800)]
[BOLT][NFC] Use std::optional in RI
Amir Ayupov [Sun, 11 Dec 2022 20:14:15 +0000 (12:14 -0800)]
[BOLT][NFC] Use std::optional for getLTOCommonName
Amir Ayupov [Sun, 11 Dec 2022 20:02:21 +0000 (12:02 -0800)]
[BOLT][NFC] Use std::optional in BC
Amir Ayupov [Sun, 11 Dec 2022 19:57:30 +0000 (11:57 -0800)]
[BOLT][NFC] Use std::optional in DataAggregator
Amir Ayupov [Sun, 11 Dec 2022 19:51:08 +0000 (11:51 -0800)]
[BOLT][NFC] Use std::optional in BAT
Craig Topper [Mon, 12 Dec 2022 04:44:24 +0000 (20:44 -0800)]
[RISCV] Enable the Machine Late Cleanup pass.
Believe the bug has been fixed with D139169
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D139753
Shilei Tian [Mon, 12 Dec 2022 03:46:56 +0000 (22:46 -0500)]
Revert "[OpenMP] Add `abort` to `FATAL_MESSAGE`"
This reverts commit
ac65b3c7a2ad67ce17d31dc14867dc83650f751e.
Shilei Tian [Mon, 12 Dec 2022 03:41:22 +0000 (22:41 -0500)]
[OpenMP] Add `abort` to `FATAL_MESSAGE`