Commit Graph

414622 Commits

Author SHA1 Message Date
Marek Kurdej 4efde1e554 [clang-format] Move FormatToken::opensBlockOrBlockTypeList to source file. NFC. 2022-02-10 10:51:03 +01:00
Tres Popp 34ff99a0b7 Revert "[MLIR] Fix fold-memref-subview-ops for affine.load/store"
This reverts commit ac6cb41303.

This code has a stack-use-after-scope error that can be seen with asan.
2022-02-10 10:46:59 +01:00
Sven van Haastregt 8d37043520 [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.
2022-02-10 09:43:32 +00:00
David Sherwood 1badfbb4fc 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
2022-02-10 09:39:12 +00:00
Roman Lebedev 09d20761eb
[llvm] Fix update_analyze_test_checks and add a test to prevent further breakage 2022-02-10 12:33:33 +03:00
Jay Foad abda8d2229 [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
2022-02-10 09:17:11 +00:00
Tres Popp 7ba3bbe8e5 Update bazel after 8d12bf4ac1 2022-02-10 10:12:13 +01:00
tyb0807 c70b935089 [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
2022-02-10 09:08:35 +00:00
Martin Storsjö 3dce6b329c [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
2022-02-10 10:59:52 +02:00
Martin Storsjö 6cf64b2d28 [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
9c62728610 (Default to DWARFv4 on Windows)
to the MinGW driver too.

Differential Revision: https://reviews.llvm.org/D119326
2022-02-10 10:59:05 +02:00
Daniil Kovalev 0f9109cc9d [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
2022-02-10 11:39:43 +03:00
Diana Picus e931f92550 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
2022-02-10 09:29:15 +01:00
Uday Bondhugula ac6cb41303 [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
2022-02-10 13:55:38 +05:30
Shraiysh Vaishay 35dfa78ff8 [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
2022-02-10 13:16:10 +05:30
Uday Bondhugula 7d7ebf3cf0 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
2022-02-10 11:33:55 +05:30
Zi Xuan Wu e8b303716e [CSKY] Add missing header include in cpp files because of LLVM headers refactor work 2022-02-10 13:41:55 +08:00
LLVM GN Syncbot 942b9652bc [gn build] Port 8f1d8785df 2022-02-10 04:36:06 +00:00
Konstantin Varlamov 8f1d8785df [libc++][ranges] Implement `permutable`.
Differential Revision: https://reviews.llvm.org/D119222
2022-02-09 20:34:20 -08:00
Uday Bondhugula 8d12bf4ac1 [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
2022-02-10 09:56:26 +05:30
Keith Smiley 19ea625910 [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
2022-02-09 20:12:43 -08:00
Abinav Puthan Purayil 29bd3fadbc [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
2022-02-10 09:26:37 +05:30
Abinav Puthan Purayil f4e8cf25af [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
2022-02-10 09:26:37 +05:30
Lang Hames 8be890b8cd [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.
2022-02-10 14:11:46 +11:00
Uday Bondhugula c2246eb893 [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
2022-02-10 08:25:55 +05:30
Ting Wang 097a95f2df [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
2022-02-09 21:48:28 -05:00
Reid Kleckner f3481f43bb [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
2022-02-09 18:23:16 -08:00
Shilei Tian 0148b58714 [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
2022-02-09 21:15:15 -05:00
Chuanqi Xu 8c930cef0e [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
2022-02-10 10:10:10 +08:00
Yuanfang Chen 4f30a52696 NFC: fix GCC warning -Wcast-qual 2022-02-09 18:03:25 -08:00
Chenbing.Zheng c5d3b231e0 [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
2022-02-10 01:59:31 +00:00
Aart Bik 6195a25487 [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
2022-02-09 16:58:25 -08:00
Eric Schweitz 3915789503 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
2022-02-09 16:50:28 -08:00
Arthur Eubanks 7aadf98d2b [test] Replace `-analyze -divergence` with `-passes='print<divergence>'` 2022-02-09 16:09:14 -08:00
Arthur Eubanks 3ebab227d9 [test] Remove one more unnecessary -analyze RUN line
There is a new PM equivalent RUN line.
2022-02-09 16:05:43 -08:00
Arthur Eubanks 687263183b [test] Test domtree validity with -verify-dom-info instead of -analyze
Verified that the test properly crashes without D16893's fix.
2022-02-09 16:00:18 -08:00
Ben Dunbobbin 666aa43cbf Fix comment after upstream: 9e08e92980 - [ELF] Allow STV_PROTECTED shared definition to set exportDynamic? 2022-02-09 23:51:31 +00:00
Arthur Eubanks f72b76cde5 [test] Replace/remove some 'opt -analyze' RUN lines 2022-02-09 15:49:53 -08:00
Arthur Eubanks 15ba588d6d [test] Migrate '-analyze -cost-model' to '-passes=print<cost-model>' 2022-02-09 15:42:16 -08:00
Lang Hames 9b25d868f4 [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
2022-02-10 10:23:02 +11:00
Arthur Eubanks 27e0c6670a [gn build] Port 76cad51b 2022-02-09 15:16:05 -08:00
Jameson Nash 76cad51ba7 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
2022-02-09 17:31:34 -05:00
Reid Kleckner b5a592a8e2 [DAG] Remove pointless std::function wrapper, NFC 2022-02-09 14:30:43 -08:00
Mathieu Fehr cf4f97c812 [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
2022-02-09 23:24:49 +01:00
Daniel Thornburgh 694f384553 [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
2022-02-09 22:20:54 +00:00
Aaron Ballman 7de7161304 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).
2022-02-09 17:16:10 -05:00
Fangrui Song f8701a30f6 [Symbolize] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D118633 2022-02-09 14:08:47 -08:00
Casey Carter 009791e0db [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
2022-02-09 14:00:24 -08:00
Reid Kleckner f63c150187 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 49ab760090.
2022-02-09 13:55:40 -08:00
Fangrui Song 528f4628c4 [DWARFLinker] Include llvm/MC/MCSubtargetInfo.h 2022-02-09 13:49:45 -08:00
Philip Reames d334fec140 [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.
2022-02-09 13:47:28 -08:00