Matthias Springer [Thu, 10 Feb 2022 10:12:46 +0000 (19:12 +0900)]
[mlir][vector][NFC] Use CombiningKindAttr instead of StringAttr
This makes the op consistent with other ops in vector dialect.
Differential Revision: https://reviews.llvm.org/D119343
Fraser Cormack [Wed, 19 Jan 2022 13:54:11 +0000 (13:54 +0000)]
[RISCV] Pre-process FP SPLAT_VECTOR to RISCVISD::VFMV_V_F_VL
This patch builds on top of D119197 to canonicalize floating-point
SPLAT_VECTOR as RISCVISD::VFMV_V_F_VL as a pre-process ISel step.
This primarily benefits scalable-vector VP code, where our VP patterns
only match VFMV_V_F_VL to reduce the burden on our ISel patterns, but
where at the same time, scalable-vector code doesn't custom-legalize
SPLAT_VECTOR.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117670
Oliver Stannard [Wed, 9 Feb 2022 17:43:42 +0000 (17:43 +0000)]
[ARM] Patterns for vector conversion between half and float
These patterns were omitted because clang only allows converting between
these types using intrinsics, but other front-ends or optimisation
passes may want to use them.
Differential revision: https://reviews.llvm.org/D119354
Marek Kurdej [Thu, 10 Feb 2022 09:14:36 +0000 (10:14 +0100)]
[clang-format] Move FormatToken::opensBlockOrBlockTypeList to source file. NFC.
Tres Popp [Thu, 10 Feb 2022 09:46:05 +0000 (10:46 +0100)]
Revert "[MLIR] Fix fold-memref-subview-ops for affine.load/store"
This reverts commit
ac6cb41303450b4cf8b5c71b971b729990b93a36.
This code has a stack-use-after-scope error that can be seen with asan.
Sven van Haastregt [Thu, 10 Feb 2022 09:43:32 +0000 (09:43 +0000)]
[OpenCL] Refactor cl_ext_float_atomics declarations; NFC
Reduce the amount of repetition in the declarations by leveraging more
TableGen constructs. This is in preparation for adding the OpenCL 3.0
atomics feature optionality.
David Sherwood [Tue, 1 Feb 2022 13:09:54 +0000 (13:09 +0000)]
Fix incorrect TypeSize->uint64_t cast in InductionDescriptor::isInductionPHI
The code was relying upon the implicit conversion of TypeSize to
uint64_t and assuming the type in question was always fixed. However,
I discovered an issue when running the canon-freeze pass with some
IR loops that contains scalable vector types. I've changed the code
to bail out if the size is unknown at compile time, since we cannot
compute whether the step is a multiple of the type size or not.
I added a test here:
Transforms/CanonicalizeFreezeInLoops/phis.ll
Differential Revision: https://reviews.llvm.org/D118696
Roman Lebedev [Thu, 10 Feb 2022 09:32:55 +0000 (12:32 +0300)]
[llvm] Fix update_analyze_test_checks and add a test to prevent further breakage
Jay Foad [Wed, 9 Feb 2022 16:03:05 +0000 (16:03 +0000)]
[GlobalISel] CSE FP constants at -O0
At -O0 we claim to CSE constants only. I think this should apply to
G_FCONSTANT as well as G_CONSTANT.
Differential Revision: https://reviews.llvm.org/D119344
Tres Popp [Thu, 10 Feb 2022 09:12:04 +0000 (10:12 +0100)]
tyb0807 [Tue, 25 Jan 2022 22:51:49 +0000 (22:51 +0000)]
[AArch64] ACLE feature macro for Armv8.8-A MOPS
This introduces the new __ARM_FEATURE_MOPS ACLE feature test macro,
which signals the availability of the new Armv8.8-A/Armv9.3-A
instructions for standardising memcpy, memset and memmove operations.
This patch supersedes the one from https://reviews.llvm.org/D116160.
Differential Revision: https://reviews.llvm.org/D118199
Martin Storsjö [Tue, 11 Jan 2022 09:31:14 +0000 (09:31 +0000)]
[libcxx] [test] Fix the aligned storage test to work on Windows
Don't test alignment over 8 KB, which isn't supported on that
platform.
Differential Revision: https://reviews.llvm.org/D119348
Martin Storsjö [Wed, 9 Feb 2022 13:15:25 +0000 (15:15 +0200)]
[clang] [MinGW] Default to DWARF 4
Neither LLDB nor GDB seem to work with DWARF 5 debug information on
Windows right now.
This applies the same change as in
9c6272861032f511a23784ce0c5cc8f6ac2f625b (Default to DWARFv4 on Windows)
to the MinGW driver too.
Differential Revision: https://reviews.llvm.org/D119326
Daniil Kovalev [Thu, 10 Feb 2022 07:17:25 +0000 (10:17 +0300)]
[NVPTX] Eliminate StoreRetval instructions with undef operand
Previously a lot of StoreRetval instructions with undef operand were
generated on NVPTX target when a big struct was returned by value.
It resulted in a lot of unneeded st.param.* instructions in final
assembly. The patch solves the issue by implementing the logic in
NVPTX-specific part of DAG combiner.
Differential Revision: https://reviews.llvm.org/D118973
Diana Picus [Wed, 9 Feb 2022 09:22:50 +0000 (10:22 +0100)]
test-release.sh: Remove test-suite from LLVM_ENABLE_PROJECTS
I think this was just being ignored before, but now it crashes because
we're checking if the projects that we're trying to enable are valid.
There is no test-suite project (it's a separate repo with separate
handling), so we should never try to enable it.
Differential Revision: https://reviews.llvm.org/D119322
Uday Bondhugula [Mon, 31 Jan 2022 11:47:10 +0000 (17:17 +0530)]
[MLIR] Fix fold-memref-subview-ops for affine.load/store
Fix fold-memref-subview-ops for affine.load/store. We need to expand out
the affine apply on its operands.
Differential Revision: https://reviews.llvm.org/D119402
Shraiysh Vaishay [Thu, 10 Feb 2022 05:08:06 +0000 (10:38 +0530)]
[OpenMP][IRBuilder] Handle floats for atomic update and fix AllocaIP for update/capture
This patch fixes `createAtomicUpdate` for lowering with float types.
Test added for the same.
This patch also changes the alloca argument for createAtomicUpdate and
createAtomicCapture from `Instruction*` to `InsertPointTy`. This is in
line with the other functions of the OpenMPIRBuilder class which take
AllocaIP as an `InsertPointTy`.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D118227
Uday Bondhugula [Thu, 10 Feb 2022 06:01:05 +0000 (11:31 +0530)]
Fix flang build breakage - trim dependency to AffineUtils
There wasn't a need for FIRTransforms to depend on AffineToStandard
conversoin for just an affine utility. The utility was moved to
AffineUtils recently. Fix flang build breakage.
Differential Revision: https://reviews.llvm.org/D119408
Zi Xuan Wu [Thu, 10 Feb 2022 05:37:37 +0000 (13:37 +0800)]
[CSKY] Add missing header include in cpp files because of LLVM headers refactor work
LLVM GN Syncbot [Thu, 10 Feb 2022 04:36:06 +0000 (04:36 +0000)]
[gn build] Port
8f1d8785df92
Konstantin Varlamov [Thu, 10 Feb 2022 04:32:56 +0000 (20:32 -0800)]
[libc++][ranges] Implement `permutable`.
Differential Revision: https://reviews.llvm.org/D119222
Uday Bondhugula [Thu, 10 Feb 2022 04:26:10 +0000 (09:56 +0530)]
[MLIR][NFC] Move expandAffineMap/Expr out to Affine utils
Move expandAffineMap and expandAffineApplyExpr out to AffineUtils. This
is a useful method. The child revision uses it. NFC.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D119401
Keith Smiley [Sun, 30 Jan 2022 18:06:41 +0000 (10:06 -0800)]
[llvm-objdump/mac] Silence XAR deprecation warning (NFC)
If you're building this on macOS 12.x+ this produces a deprecation
warning. I'm not sure what this means for the bitcode format going
forward, but it seems safe to silence for now.
Differential Revision: https://reviews.llvm.org/D118569
Abinav Puthan Purayil [Mon, 7 Feb 2022 17:48:10 +0000 (23:18 +0530)]
[AMDGPU] Select no-return atomic ops in FLATInstructions.td.
This change adds the selection for the no-return global_* and flat_*
instructions in tblgen. The motivation for this is to get the no-return atomic
isel working without relying on post-isel hooks so that GlobalISel can start
selecting them (once GlobalISelEmitter allows no return atomic patterns like
how DAGISel does).
Differential Revision: https://reviews.llvm.org/D119227
Abinav Puthan Purayil [Mon, 27 Dec 2021 10:46:38 +0000 (16:16 +0530)]
[AMDGPU] Select no-return ds_* atomic ops in tblgen.
SelectionDAG relies on MachineInstr's HasPostISelHook for selecting the
no-return atomic ops. GlobalISel, at the moment, doesn't handle
HasPostISelHook.
This change adds the selection for no-return ds_* atomic ops in tblgen
so that it can work with both GlobalISel and SelectionDAG. I couldn't
add the predicates for GlobalISel in this change since there's a
restriction in GlobalISelEmitter that disallows selecting generic
atomics ops that return with instructions that doesn't return.
We can't remove the HasPostISelHook code that selects the no return
atomic ops in SelectionDAG yet since we still need to cover selections
in FLATInstructions.td, BUFInstructions.td.
Differential Revision: https://reviews.llvm.org/D115881
Lang Hames [Thu, 10 Feb 2022 02:53:03 +0000 (13:53 +1100)]
[ORC-RT] Add two new jit-dlopen testcases, and switch to .c for dlopen tests.
We don't need precise control over the low-level behavior of these testcases so
C should be preferred for readability.
The new testcases test (1) the base dlopen case (running initializers and
deinitializers), and (2) the serial case of dlopen; dlclose; dlopen; dlclose,
where we expect the initializers and deinitializers to be run twice.
Uday Bondhugula [Thu, 10 Feb 2022 02:36:19 +0000 (08:06 +0530)]
[MLIR][NFC] Remove unused argument in affine scalrep helper util
NFC. Remove unused argument in affine scalrep helper utility.
Differential Revision: https://reviews.llvm.org/D119397
Ting Wang [Thu, 10 Feb 2022 02:48:28 +0000 (21:48 -0500)]
[PowerPC] Add custom lowering for SELECT_CC fp128 using xsmaxcqp
Power ISA 3.1 adds xsmaxcqp/xsmincqp for quad-precision type-c max/min selection,
and this opens the opportunity to improve instruction selection on: llvm.maxnum.f128,
llvm.minnum.f128, and select_cc ordered gt/lt and (don't care) gt/lt.
Reviewed By: nemanjai, shchenz, amyk
Differential Revision: https://reviews.llvm.org/D117006
Reid Kleckner [Thu, 10 Feb 2022 00:31:38 +0000 (16:31 -0800)]
[X86] Only force FP usage in the presence of pushf/popf on Win64
This ensures that the Windows unwinder will work at every instruction
boundary, and allows other targets to read and write flags without
setting up a frame pointer.
Fixes GH-46875
Differential Revision: https://reviews.llvm.org/D119391
Shilei Tian [Thu, 10 Feb 2022 02:15:05 +0000 (21:15 -0500)]
[OMPIRBuilder] Remove the support for floating point values for atomic compare operation
This patch removes the type punning in atomic compare operation for
floating point values because the direct comparison doesn't make too much sense
for floating point values.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D119378
Chuanqi Xu [Thu, 10 Feb 2022 01:56:44 +0000 (09:56 +0800)]
[NFC] [Modules] Refactor ODR checking for default template argument in
ASTReader
This is a cleanup to reduce the lines of code to handle default template
argument in ASTReader.
Reviewed By: urnathan
Differential Revision: https://reviews.llvm.org/D118437
Yuanfang Chen [Thu, 10 Feb 2022 02:03:04 +0000 (18:03 -0800)]
NFC: fix GCC warning -Wcast-qual
Chenbing.Zheng [Thu, 10 Feb 2022 01:46:47 +0000 (01:46 +0000)]
[RISCV] Add support for matching vwmaccsu/vwmaccus from fixed vectors
Add pattern to match add and widening mul to vwmacc, and
two multipliers are sext and zext.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D119314
Aart Bik [Wed, 9 Feb 2022 22:23:22 +0000 (14:23 -0800)]
[mlir][sparse][pytaco] test cleanup
removed obsoleted TODO
removed strange Fp precision for coordinates
lined up meta data testing code for readability
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D119377
Eric Schweitz [Wed, 9 Feb 2022 21:11:05 +0000 (13:11 -0800)]
Folding in the front end was replacing calls to LEN and dropping
arguments even in situations where the arguments are required to compute
the LEN value at runtime.
Add tests.
Differential Revision: https://reviews.llvm.org/D119373
Arthur Eubanks [Thu, 10 Feb 2022 00:09:14 +0000 (16:09 -0800)]
[test] Replace `-analyze -divergence` with `-passes='print<divergence>'`
Arthur Eubanks [Thu, 10 Feb 2022 00:05:43 +0000 (16:05 -0800)]
[test] Remove one more unnecessary -analyze RUN line
There is a new PM equivalent RUN line.
Arthur Eubanks [Wed, 9 Feb 2022 23:59:00 +0000 (15:59 -0800)]
[test] Test domtree validity with -verify-dom-info instead of -analyze
Verified that the test properly crashes without D16893's fix.
Ben Dunbobbin [Mon, 7 Feb 2022 14:34:31 +0000 (14:34 +0000)]
Fix comment after upstream:
9e08e9298059651e4f42eb608c3de9d4ad8004b2 - [ELF] Allow STV_PROTECTED shared definition to set exportDynamic?
Arthur Eubanks [Wed, 9 Feb 2022 23:49:53 +0000 (15:49 -0800)]
[test] Replace/remove some 'opt -analyze' RUN lines
Arthur Eubanks [Wed, 9 Feb 2022 23:25:18 +0000 (15:25 -0800)]
[test] Migrate '-analyze -cost-model' to '-passes=print<cost-model>'
Lang Hames [Wed, 9 Feb 2022 02:02:48 +0000 (13:02 +1100)]
[ORC] Make LLJIT's destructor virtual.
This allows LLLazyJIT instances to be safely owned by unique_ptr<LLJIT>s.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D119064
Arthur Eubanks [Wed, 9 Feb 2022 23:16:05 +0000 (15:16 -0800)]
Jameson Nash [Mon, 7 Feb 2022 23:46:33 +0000 (18:46 -0500)]
replace clang LLVM_ENABLE_PLUGINS -> CLANG_PLUGIN_SUPPORT in tests
Ensure CLANG_PLUGIN_SUPPORT is compatible with llvm_add_library.
Fixes an issue noted in D111100.
Differential Revision: https://reviews.llvm.org/D119199
Reid Kleckner [Wed, 9 Feb 2022 22:30:32 +0000 (14:30 -0800)]
[DAG] Remove pointless std::function wrapper, NFC
Mathieu Fehr [Wed, 9 Feb 2022 22:23:43 +0000 (23:23 +0100)]
[mlir] Add classes to define new TypeIDs at runtime
TypeIDAllocator enables the allocation of new TypeIDs at runtime,
that are unique during the lifetime of the allocator.
NonMovableTypeIDOwner is a class used to define a new TypeID for each instance
of a class, using the instance address. This class cannot be copied or moved.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D104534
Daniel Thornburgh [Mon, 31 Jan 2022 22:22:22 +0000 (22:22 +0000)]
[Debuginfod] Flag-determine debuginfod lookups in llvm-symbolizer.
This change adds a pair of flags controlling whether llvm-symbolizer
attempts debuginfod lookups. Lookups are attempted if --debuginfod is
passed and disabled if --no-debuginfod is passed.
The default behavior is made more nuanced: debuginfod lookups are now
only attempted if an HTTP client is compiled in and at least one backing
debuginfod URL was configured via environment variable. Previously,
debuginfod lookups would always be attempted, even if there were no
chance that they could succeed.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D118665
Aaron Ballman [Wed, 9 Feb 2022 22:13:53 +0000 (17:13 -0500)]
Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,
void func();
becomes
void func(void);
This is the sixth batch of tests being updated (there are a significant
number of other tests left to be updated).
Fangrui Song [Wed, 9 Feb 2022 22:08:47 +0000 (14:08 -0800)]
[Symbolize] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D118633
Casey Carter [Wed, 29 Dec 2021 22:12:40 +0000 (14:12 -0800)]
[libcxx][test] optional's comparisons with optional are not portably constrained
so use them as concept test cases only with libc++.
Differential Revision: https://reviews.llvm.org/D116884
Reid Kleckner [Wed, 9 Feb 2022 21:52:26 +0000 (13:52 -0800)]
Revert "[DagCombine] Increase depth by number of operands to avoid a pathological compile time."
Appears to be causing check-llvm to fail
This reverts commit
49ab760090514dcbf84bd9dc7429146c4ca578ef.
Fangrui Song [Wed, 9 Feb 2022 21:49:45 +0000 (13:49 -0800)]
[DWARFLinker] Include llvm/MC/MCSubtargetInfo.h
Philip Reames [Wed, 9 Feb 2022 21:15:17 +0000 (13:15 -0800)]
[SCEV] Make SCEVUnionPredicate externally immutable [NFC]
This is the last major stepping stone before being able to allocate the node via the folding set allocator. That will in turn allow more general SCEV predicate expression trees.
Marek Kurdej [Mon, 7 Feb 2022 07:51:57 +0000 (08:51 +0100)]
[clang-format] Fix formatting of macro definitions with a leading comment.
Fixes https://github.com/llvm/llvm-project/issues/43206.
Reviewed By: HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D118924
Marek Kurdej [Wed, 9 Feb 2022 21:16:16 +0000 (22:16 +0100)]
[clang-format] Fix formatting of the array form of delete.
Fixes https://github.com/llvm/llvm-project/issues/53576.
There was an inconsistency in formatting of delete expressions.
Before:
```
delete (void*)a;
delete[](void*) a;
```
After this patch:
```
delete (void*)a;
delete[] (void*)a;
```
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D119117
Alina Sbirlea [Thu, 3 Feb 2022 07:31:07 +0000 (23:31 -0800)]
[DagCombine] Increase depth by number of operands to avoid a pathological compile time.
We're hitting a pathological compile-time case, profiled to be in
DagCombiner::visitTokenFactor and many inserts into a SmallPtrSet.
It looks like one of the paths around findBetterNeighborChains is not
capped and leads to this.
This patch resolves the issue. Looking for feedback if this solution
looks reasonable.
Differential Revision: https://reviews.llvm.org/D118877
Med Ismail Bennani [Tue, 8 Feb 2022 22:44:57 +0000 (14:44 -0800)]
[lldb/crashlog] Fix arm64 register parsing on crashlog.py
This patch fixes the register parser for arm64 crashlogs.
Compared to x86_64 crashlogs, the arm64 crashlogs nests the general
purpose registers into a separate dictionary within `thread_state`
dictionary. It uses the dictionary key as the the register number.
Differential Revision: https://reviews.llvm.org/D119168
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Med Ismail Bennani [Tue, 8 Feb 2022 22:44:43 +0000 (14:44 -0800)]
[lldb/test] Split Scripted Process test in multiple tests (NFC)
This splits the scripted process tests to be able to run in parallel
since some of test functions can take a very long time to run.
This also disables debug info testing.
Differential Revision: https://reviews.llvm.org/D118513
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Med Ismail Bennani [Tue, 8 Feb 2022 22:43:36 +0000 (14:43 -0800)]
[lldb/test] Fix TestScriptedProcess.py timeout on x86_64
This patch fixes a timeout issue on the ScriptedProcess test that was
happening on intel platforms. The timeout was due to a misreporting of
the StopInfo in the ScriptedThread that caused the ScriptedProcess to
never stop.
To solve this, this patch changes the way a ScriptedThread reports its
stop reason by making it more architecture specific. In order to do so,
this patch also refactors the ScriptedProcess & ScriptedThread
initializer methods to provide an easy access to the target architecture.
Differential Revision: https://reviews.llvm.org/D118484
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Zequan Wu [Wed, 9 Feb 2022 21:19:29 +0000 (13:19 -0800)]
[LLDB][NativePDB] fix that FindSymbolScope never finds scope of a symbol if it doesn't open a scope
Florian Hahn [Wed, 9 Feb 2022 21:16:49 +0000 (21:16 +0000)]
[ConstraintElimination] Skip floating point compares. (NFC)
The solver only supports integer conditions. Adding floating point
compares to the worklist only adds extra work. Just skip them.
Marek Kurdej [Wed, 9 Feb 2022 20:58:22 +0000 (21:58 +0100)]
[clang-format] Honour "// clang-format off" when using QualifierOrder.
Fixes https://github.com/llvm/llvm-project/issues/53643.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D119218
Philip Reames [Wed, 9 Feb 2022 21:03:42 +0000 (13:03 -0800)]
[SCEV] Remove a direct call to SCEVUnionPredicate::add [NFC]
Rainer Orth [Wed, 9 Feb 2022 21:01:55 +0000 (22:01 +0100)]
[MLIR][Presburger] Disambiguate call to floor
While testing LLVM 14.0.0 rc1 on Solaris, compilation of `FAIL`ed with
/var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp: In lambda function:
/var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/Analysis/Presburger/Utils.cpp:48:58: error: call of overloaded ‘floor(int64_t)’ is ambiguous
48 | [gcd](int64_t &n) { return floor(n / gcd); });
| ^
...
/usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:201:21:
note: candidate: ‘long double std::floor(long double)’
201 | inline long double floor(long double __X) { return __floorl(__X); }
| ^~~~~
/usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:165:15:
note: candidate: ‘float std::floor(float)’
165 | inline float floor(float __X) { return __floorf(__X); }
| ^~~~~
/usr/gcc/10/lib/gcc/sparcv9-sun-solaris2.11/10.3.0/include-fixed/iso/math_iso.h:78:15:
note: candidate: ‘double std::floor(double)’
78 | extern double floor __P((double));
| ^~~~~
The same issue had already occured in the past, cf. D108750
<https://reviews.llvm.org/D108750>, and the solution is the same: cast the
`floor` arg to `double`.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D119324
Martin Storsjö [Wed, 9 Feb 2022 17:36:58 +0000 (19:36 +0200)]
[libunwind] Avoid a warning in 32 bit builds. NFC.
The warning was introduced with the recently merged SPARCv9
support in
2b9554b8850192bdd86c02eb671de1d866df8d87.
The cast matches the existing surrounding cases.
Differential Revision: https://reviews.llvm.org/D119353
Rainer Orth [Wed, 9 Feb 2022 20:59:52 +0000 (21:59 +0100)]
[mlir][sparse] Rename index_t to index_type again
While testing LLVM 14.0.0 rc1 on Solaris, I ran into a compile failure:
from /var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:22:
/usr/include/sys/types.h:103:16: error: conflicting declaration ‘typedef short int index_t’
103 | typedef short index_t;
| ^~~~~~~
In file included from
/var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp:17:
/var/llvm/llvm-14.0.0-rc1/rc1/llvm-project/mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h:26:7:
note: previous declaration as ‘using index_t = uint64_t’
26 | using index_t = uint64_t;
| ^~~~~~~
The same issue had already occured in the past and fixed in D72619
<https://reviews.llvm.org/D72619>. More detailed explanation can also be
found there.
Tested on `amd64-pc-solaris2.11` and `sparcv9-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D119323
Philip Reames [Wed, 9 Feb 2022 20:16:10 +0000 (12:16 -0800)]
[SCEV] Unwind SCEVUnionPredicate from getPredicatedBackedgeTakenCount [NFC]
For those curious, the whole reason for tracking the predicate set seperately as opposed to just immediately registering the dependencies appears to be allowing the printing code to print a result without changing the PSE state. It's slightly questionable if this justifies the complexity, but since we can preserve it with local ugliness, I did so.
Guillaume Chatelet [Tue, 8 Feb 2022 14:52:50 +0000 (14:52 +0000)]
[libc] undefined reference in LibcTest.cpp
GCC complains about undefined reference in LibcTest.cpp and indeed the wrong version of the template has been explicitly instanciated.
This is necessary to get llvm-libc compile with GCC.
Mentionning D119002 here for navigability.
Differential Revision: https://reviews.llvm.org/D119242
Peter Steinfeld [Wed, 9 Feb 2022 19:17:18 +0000 (11:17 -0800)]
[flang] Upstream runtime changes for inquiry intrinsics
This change adds runtime routines and tests for LBOUND when passed a DIM argument, SIZE, and UBOUND when not passed a DIM argument.
Associated changes for lowering have already been merged into fir-dev.
Differential Revision: https://reviews.llvm.org/D119360
Joseph Huber [Wed, 9 Feb 2022 18:43:56 +0000 (13:43 -0500)]
[Libomptarget] Increase stack size for bug49779 test
The 'bug49779.cpp' test has been failing recently. This is because the
runtime is sufficiently complex when using nested parallelism without
optimizations that the CUDA tools cannot statically determine the stack
size. Because of this the kernel can exceed the thread stack size and
crash. Work around this using the 'LIBOMPTARGET_STACK_SIZE' environment
variable and add an FAQ entry for this situation.
Fixes #53670
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D119357
Craig Topper [Wed, 9 Feb 2022 20:03:22 +0000 (12:03 -0800)]
[RISCV] Teach RISCVDAGToDAGISel::selectShiftMask to replace sub from constant with neg.
If the shift amount is (sub C, X) where C is 0 modulo the size of
the shift, we can replace it with neg or negw.
Similar is is done for AArch64 and X86.
Reviewed By: khchen
Differential Revision: https://reviews.llvm.org/D119089
Saurabh Jha [Wed, 9 Feb 2022 20:10:30 +0000 (20:10 +0000)]
[mlir] Use sparse-compiler pass in sparse benchmark
This patch uses sparse-compiler option in mlir sparse tensor benchmark
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D118579
Philip Reames [Wed, 9 Feb 2022 20:04:25 +0000 (12:04 -0800)]
[SCEV] Remove conversion to SCEVUnionPredicate in ExitNotTakenInfo [NFC]
This removes one of the places where we mutate an existing union predicate.
Sanjay Patel [Wed, 9 Feb 2022 20:05:12 +0000 (15:05 -0500)]
[InstCombine] improve test name and cleanup; NFC
The last test was intended to be a negative test with D114272,
but a more general fold can reduce it, so that is renamed.
These are all single-block tests, so remove the unnecessary labels.
David Green [Wed, 9 Feb 2022 20:02:54 +0000 (20:02 +0000)]
Revert "[LV] Remove `LoopVectorizationCostModel::useEmulatedMaskMemRefHack()`"
This reverts commit
77a0da926c9ea86afa9baf28158d79c7678fc6b9 as we've
received multiple reports of this significantly impacting performance,
in ways that don't seem to just be target specific cost models going
wrong. I would offer some reproducers, but the test changes here seem to
be full of them!
Reverting for now and hopefully we can remove the "hack" more carefully
as we go.
Alexander Yermolovich [Wed, 9 Feb 2022 19:51:32 +0000 (11:51 -0800)]
[DWARF][codegen] Fix for Aranges when split inlining is present
When we enable -fsplit-dwarf-inlining we end up with two entries
in .debug_aranges for each CU. Because it processes Skeleton CU
inline information and DWO CU.
Furthermore address calculations were incorrect because we were processing sections in Skeleton CU.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D118857
Craig Topper [Wed, 9 Feb 2022 19:37:26 +0000 (11:37 -0800)]
[RISCV] Add a really basic cost model for SK_Splice.
While testing scalable vectors I found that if we generate a
vector splice intrinsic and run the code through the loop unroller,
we'll crash due to an invalid cost.
This adds a basic cost based on the 2 slide instructions used by the
lowering in D119303.
We probably need to factor LMUL into this, but that's true for
arithmetic instructions too. So I've ignored for the moment.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D119316
Andy Yankovsky [Wed, 9 Feb 2022 19:40:50 +0000 (20:40 +0100)]
[lldb] Disable failing test on Windows
Test was introduced in https://reviews.llvm.org/D113498.
Fangrui Song [Wed, 9 Feb 2022 19:38:28 +0000 (11:38 -0800)]
[MC] clang-format llvm/MC/MCContext.h. NFC
People get clang-format lints when changing declarations in the large block,
e.g.
ef736a1c39f27ef4777bbe6cf3af68c1fd588c8a Cleanup LLVMMC headers.
Just format it to reduce hassle in the future.
Craig Topper [Wed, 9 Feb 2022 19:08:24 +0000 (11:08 -0800)]
[RISCV][VP] Lower VP_FMA to RVV instructions.
We already had FMA_VL node, but we didn't have masked patterns.
I have not added the fneg variations. I'll do those after I add
llvm.vp.fneg.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D119196
Erich Keane [Wed, 9 Feb 2022 19:25:58 +0000 (11:25 -0800)]
[NFC] Fix sign-compare warning in GrammarBNF thanks to int promotion
Craig Topper [Wed, 9 Feb 2022 18:56:39 +0000 (10:56 -0800)]
[RISCV] Lower VP_FNEG to RVV instructions
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D119269
Fangrui Song [Wed, 9 Feb 2022 18:38:36 +0000 (10:38 -0800)]
[ELF][docs] Remove ignore -dc from ld.lld.1
Fangrui Song [Wed, 9 Feb 2022 18:35:53 +0000 (10:35 -0800)]
[ELF] Remove obscure -dp and GNU ld incompatible --[no-]define-common, ignore -d/-dc
https://maskray.me/blog/2022-02-06-all-about-common-symbols#no-define-common
In GNU ld, -dc only affects -r links and causes COMMON symbols to be allocated.
--no-define-common is defined to make COMMON symbols undefined for -shared.
AIUI --no-define-common is a workaround around glibc 2.1 time and not really useful.
gold confuses --define-common with -d/FORCE_COMMON_ALLOCATION and implements
--define-common with -d semantics. Its --no-define-common is incompatible with
GNU ld.
In ld.lld,
b2a23cf3c08cee45614f27eb2c6d044e506aa6a6 fixed the default -r
behavior for COMMON symbols but ported the incompatible gold
--[no-]define-common. To the best of my knowledge, no project uses -dp
--[no-]define-common. So just remove these options.
-d/-dc are used by the following projects:
* grub grub-core/genmod.sh.in uses -Wl,-r,-d (https://lists.gnu.org/archive/html/grub-devel/2022-02/msg00088.html)
* FreeBSD crunchgen uses -Wl,-dc (https://reviews.freebsd.org/D34215)
A no-op implementation works for them. Only when a program inspects relocatable
output by itself and does not recognize COMMON symbols, there may be a problem.
This is an extremely unlikely case.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D119108
Philip Reames [Tue, 8 Feb 2022 19:39:22 +0000 (11:39 -0800)]
[SCEV] Add interface for constructing generic SCEVComparePredicate [NFC}
Florian Hahn [Wed, 9 Feb 2022 18:00:03 +0000 (18:00 +0000)]
[ConstraintElimination] Remove redundant lookup (NFC).
Matthias Springer [Wed, 9 Feb 2022 16:21:55 +0000 (01:21 +0900)]
[mlir][GPU] Add ShuffleOp builder for constant offset/width
Differential Revision: https://reviews.llvm.org/D119345
LLVM GN Syncbot [Wed, 9 Feb 2022 17:34:07 +0000 (17:34 +0000)]
[gn build] Port
f1984b143367
LLVM GN Syncbot [Wed, 9 Feb 2022 17:34:06 +0000 (17:34 +0000)]
[gn build] Port
46a6f5ae148a
Florian Hahn [Wed, 9 Feb 2022 17:29:48 +0000 (17:29 +0000)]
[ConstraintElimination] Move some definitions closer to uses (NFC).
Arthur Eubanks [Wed, 9 Feb 2022 17:22:21 +0000 (09:22 -0800)]
[LoopLoadElim] Support opaque pointers
With typed pointers the pointer operand type checks the address space
and the load/store type. With opaque pointers we have to check the
load/store type separately.
Arthur Eubanks [Tue, 8 Feb 2022 02:16:08 +0000 (18:16 -0800)]
[OpaquePtr][LoopAccessAnalysis] Support opaque pointers
Previously we relied on the pointee type to determine what type we need
to do runtime pointer access checks.
With opaque pointers, we can access a pointer with more than one type,
so now we keep track of all the types we're accessing a pointer's
memory with.
Also some other minor getPointerElementType() removals.
Reviewed By: #opaque-pointers, nikic
Differential Revision: https://reviews.llvm.org/D119047
Arthur Eubanks [Wed, 9 Feb 2022 17:10:54 +0000 (09:10 -0800)]
[gn build] Port
a1862d78eb45
Jay Foad [Wed, 9 Feb 2022 17:05:19 +0000 (17:05 +0000)]
[AMDGPU] Remove dead code from shrinkScalarLogicOp
It looks like this code has been dead since shrinkScalarLogicOp
was introduced in svn r348601.
Pavel Labath [Wed, 9 Feb 2022 16:38:27 +0000 (17:38 +0100)]
[lldb] Account for extra threads in TestGdbRemoteThreadsInStopReply on windows
After
9611282c, TestGdbRemoteThreadsInStopReply is not non-deterministic
-- instead it deterministically fails due to extra threads created by
std::thread thread pool.
Adjust the tests to account for that.
Andy Yankovsky [Tue, 9 Nov 2021 18:41:56 +0000 (19:41 +0100)]
[lldb] Constant-resolve operands to `getelementptr`
Operands to `getelementptr` can be constants or constant expressions. Check
that all operands can be constant-resolved and resolve them during the
evaluation. If some operands can't be resolved as constants -- the expression
evaluation will fallback to JIT.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=52449
Reviewed By: #lldb, shafik
Differential Revision: https://reviews.llvm.org/D113498
Mark de Wever [Tue, 8 Feb 2022 17:32:08 +0000 (18:32 +0100)]
[libc++] Enables put_long_double test for glibc.
Glibc adds a +-sign for NaN-values when showpos fmtflags are set.
[tab:ios.fmtflags]
showpos generates a + sign in non-negative generated numeric output
Since NaNs aren't negative this behaviour seems correct. Enable the test
for glibc and add ifdefs to make sure the existing tests still pass.
This was noticed while working on D118971.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D119260
Mark de Wever [Thu, 3 Feb 2022 18:02:36 +0000 (19:02 +0100)]
[libc++][format][nfc] Header cleanup.
Remove the unneeded macro protection, forward declarations, and
includes.
Reviewed By: #libc, Quuxplusone, ldionne, philnik
Differential Revision: https://reviews.llvm.org/D118925
Craig Topper [Wed, 9 Feb 2022 16:05:42 +0000 (08:05 -0800)]
[RISCV] Pre-process integer ISD::SPLAT_VECTOR to RISCISD::VMV_V_X_VL before isel.
This allows us to remove some isel patterns that exist for both
operations. Saving nearly 3000 bytes from the isel table.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D119197
Mark de Wever [Wed, 2 Feb 2022 18:28:04 +0000 (19:28 +0100)]
[libc++][nfc] Use TEST_HAS_NO_WIDE_CHARACTERS.
This avoids using an libc++ internal macro in our tests.
Reviewed By: #libc, Quuxplusone
Differential Revision: https://reviews.llvm.org/D119263