Commit Graph

412421 Commits

Author SHA1 Message Date
Marek Kurdej 4100cf2e92 [Visualizers] Fix Optional visualizer.
As discussed in https://reviews.llvm.org/D118105#3268773, OptionalStorage has been changed in commit fb97305750, but the visualizer still tries to use old members.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118117
2022-01-25 14:16:03 +01:00
Matthias Springer 694df0f0a8 [mlir][linalg][bufferize] Fix build
This fixes a linker error related to ModuleBufferization.cpp.

Differential Revision: https://reviews.llvm.org/D118127
2022-01-25 21:59:23 +09:00
Pavel Labath 6b67e89b45 [lldb] Fix windows build for D117490
I forgot to update ProcessWindowsLog to the new API.
2022-01-25 13:51:53 +01:00
Pavel Labath 345d85e124 [lldb] Fix mac build for D117490
This is exactly that kind of a API misuse that the patch was meant to
detect.
2022-01-25 13:42:24 +01:00
Simon Pilgrim fc15ab7b1b [X86] Add folded load tests to PR46809 tests 2022-01-25 12:37:15 +00:00
Danila Malyutin 153b1e3cba [AArch64] Add patterns for relaxed atomic ld/st into fp registers
Adds patterns to match integer loads/stores bitcasted to fp values

Fixes https://github.com/llvm/llvm-project/issues/52927

Differential Revision: https://reviews.llvm.org/D117573
2022-01-25 15:33:37 +03:00
Paul Walker d95cf1f6cf [SVE] Enable ISD::ABDS/U ISel for scalable vectors.
NOTE: This patch also includes tests that highlight those cases
where the existing DAG combine doesn't yet work well for SVE.

Differential Revision: https://reviews.llvm.org/D117873
2022-01-25 12:14:53 +00:00
Nikita Popov 78e1f70220 [ObjCARCOpts] Use standard non-terminator unreachable pattern
This is what CreateNonTerminatorUnreachable() in InstCombine uses.
Specific choice here doesn't really matter, but we should pick
one that is pointer element type independent.
2022-01-25 13:08:03 +01:00
Nikita Popov 4f4d071c90 [ObjCArcOpts] Regenerate test checks (NFC) 2022-01-25 13:07:36 +01:00
Nikita Popov 3e2ae92d3f [SCEV] Remove an unnecessary GEP type check
The code already checked that the addrec step size and type alloc
size are the same. The actual pointer element type is irrelevant
here.
2022-01-25 12:56:46 +01:00
Simon Pilgrim 15e2be291f [DAG] visitMULHS/MULHU/AND - remove some redundant LHS constant checks
Now that we constant fold and canonicalize constants to the RHS, we don't need to check both LHS and RHS for specific constants
2022-01-25 11:54:23 +00:00
Simon Pilgrim 157f9b68a3 [X86] combineVectorSignBitsTruncation - fix indentation. NFC. 2022-01-25 11:54:22 +00:00
Nikita Popov d8962b4139 [llvm-c] Deprecate LLVMBuildPtrDiff()
In favor of LLVMBuildPtrDiff2(), which accepts an explicit element
type and is compatible with opaque pointers.
2022-01-25 12:47:50 +01:00
Nikita Popov 30d4a7e295 [IRBuilder] Require explicit element type in CreatePtrDiff()
For opaque pointer compatibility, we cannot derive the element
type from the pointer type.
2022-01-25 12:43:57 +01:00
Sven van Haastregt 91a0b464a8 [OpenCL] Make read_write images optional for -fdeclare-opencl-builtins
Ensure any use of a `read_write` image is guarded behind the
`__opencl_c_read_write_images` feature macro.

Differential Revision: https://reviews.llvm.org/D117899
2022-01-25 11:40:31 +00:00
Nikita Popov caff8591ef [OpenMP] Simplify pointer comparison
Rather than checking ptrdiff(a, b) != 0, directly check a != b.
2022-01-25 12:38:37 +01:00
Adrian Kuegel a83e9266b9 [mlir][Bazel] Update BUILD.bazel file 2022-01-25 12:33:42 +01:00
Chuanqi Xu dbbe010908 [MLIR] [AsyncToLLVM] Use llvm.coro.align intrinsic
Use llvm.coro.align to align coroutine frame properly.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D117978
2022-01-25 19:28:25 +08:00
Bjorn Pettersson 109cc5adcc [DAGCombine] Fold SRA of a load into a narrower sign-extending load
An sra is basically sign-extending a narrower value. Fold away the
shift by doing a sextload of a narrower value, when it is legal to
reduce the load width accordingly.

Differential Revision: https://reviews.llvm.org/D116930
2022-01-25 12:14:48 +01:00
Pavel Labath ce6903595b [lldb/test] Use abspath when searching for lldb.exe
realpath is too aggressive and does not produce the desired effect if
ones build folder is a symlink farm.
2022-01-25 12:13:49 +01:00
Pavel Labath 0f08db66db [lldb] Make logging machinery type-safe
This patch makes use of c++ type checking and scoped enums to make
logging statements shorter and harder to misuse.

Defines like LIBLLDB_LOG_PROCESS are replaces with LLDBLog::Process.
Because it now carries type information we do not need to worry about
matching a specific enum value with the right getter function -- the
compiler will now do that for us.

The main entry point for the logging machinery becomes the GetLog
(template) function, which will obtain the correct Log object based on
the enum type. It achieves this through another template function
(LogChannelFor<T>), which must be specialized for each type, and should
return the appropriate channel object.

This patch also removes the ability to log a message if multiple
categories are enabled simultaneously as it was unused and confusing.

This patch does not actually remove any of the existing interfaces. The
defines and log retrieval functions are left around as wrappers around
the new interfaces. They will be removed in follow-up patch.

Differential Revision: https://reviews.llvm.org/D117490
2022-01-25 12:13:49 +01:00
Fraser Cormack 7cb452bfde [SelectionDAG][VP] Add widening support for VP_MERGE
This patch adds widening support for ISD::VP_MERGE, which widens
identically to VP_SELECT and similarly to other select-like nodes.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D118030
2022-01-25 10:59:40 +00:00
Nikita Popov 99adacbcb7 [clang] Remove some getPointerElementType() uses
Same cases where the call can be removed in a straightforward way.
2022-01-25 12:09:06 +01:00
Simon Tatham f302e0b5dd [AArch64] Exclude optional features from HasV8_0rOps.
The following SubtargetFeatures are removed from the definition of
HasV8_0rOps, on the grounds that they are optional in Armv8.4-A, and
therefore (by the definition of Armv8.0-R) also optional in v8.0-R:

 * performance monitoring: FeaturePerfMon
 * cryptography: FeatureSM4 and FeatureSHA3
 * half-precision FP: FeatureFullFP16, FeatureFP16FML
 * speculation control: FeatureSSBS, FeaturePredRes, FeatureSB,
   FeatureSpecRestrict

This isn't the full set of features that are listed as optional in the
spec. FeatureCCIDX and FeatureTRACEV8_4 are also optional. But LLVM
includes those in HasV8_3aOps and HasV8_4aOps respectively (I think on
the grounds that the system registers they enable are useful to be
able to access after a runtime check), and so for consistency, I've
left those in HasV8_0rOps too.

After this commit, HasV8_0rOps is a strict subset of HasV8_4aOps (but
missing features that are not in Armv8.0-R at all).

The definition of Cortex-R82 is correspondingly updated to add most of
the features that I've removed from base Armv8.0-R (with the exception
of the cryptography ones), since that particular implementation of
v8.0-R does have them.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D118045
2022-01-25 10:54:59 +00:00
Benjamin Kramer 2074eef5db [bazel] Adjust dependencies after a70aa7bb
These are all picked up transitively, but fail with
--features=layering_check, which enforces header dependencies.
2022-01-25 11:49:45 +01:00
Victor Perez 19d3dc6e22 [VP] Update CodeGen/RISCV/rvv/vpgather-sdnode.ll test 2022-01-25 10:49:05 +00:00
Fraser Cormack 5f5c5603ce [SelectionDAG][VP] Add splitting support for VP_MERGE
This patch adds splitting support for ISD::VP_MERGE, which splits
identically to VP_SELECT and similarly to other select-like nodes.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D118032
2022-01-25 10:33:23 +00:00
Dávid Bolvanský 9fa6ad4c58 Revert "[NFC] Added test with select with unpredictable metadata; regenerate x86-cmov-converter.ll"
This reverts commit e2f8d28afb.
2022-01-25 11:28:26 +01:00
Dávid Bolvanský e2f8d28afb [NFC] Added test with select with unpredictable metadata; regenerate x86-cmov-converter.ll 2022-01-25 11:13:20 +01:00
Hsiangkai Wang 901dd53cbf [docs] There are more than three bit storage containers.
To avoid listing all the bit containers in the title and do not use the
specific number for the number of bit containers.

Differential Revision: https://reviews.llvm.org/D117849
2022-01-25 10:09:18 +00:00
Hsiangkai Wang 48f763edb4 [docs] Refine the description in Set-Like and Map-Like container options.
In "Other Set-Like Container Options":
* Drops the references to C++ TR1 and SGI and hash_set.
* Drops the worry about portability (this was a problem with hash_set, but
std::unordered_set has worked portably since LLVM started depending
on C++11).

It is similar in "Other Map-Like Container Options" section.

Differential Revision: https://reviews.llvm.org/D117858
2022-01-25 10:09:18 +00:00
Victor Perez 2233befa5d [LegalizeTypes][VP] Add splitting support for vp.gather and vp.scatter
Split these nodes in a similar way as their masked versions.

Reviewed By: frasercrmck, craig.topper

Differential Revision: https://reviews.llvm.org/D117760
2022-01-25 10:08:07 +00:00
David Sherwood 13252160c3 [NFC] Move useSVEForFixedLengthVectors into AArch64Subtarget.h
Given how small the function is and how often it gets used it
makes more sense to live in the header file.

Differential Revision: https://reviews.llvm.org/D117883
2022-01-25 09:49:04 +00:00
Nikita Popov 184591aeeb [OpaquePtrs] Deprecate PointerType::getElementType()
This deprecates PointerType::getElementType() in favor of
Type::getPointerElementType(). The motivation is to make it more
apparent when code accesses the pointer element type, because
getElementType() may also also refer to at least
ArrayType::getElementType() and VectorType::getElementType().

Differential Revision: https://reviews.llvm.org/D117885
2022-01-25 10:13:53 +01:00
Nikita Popov 22487280dc [NFC] Remove more uses of PointerType::getElementType() (NFC)
Replace more uses which I missed in the first pass with
Type::getPointerElementType().
2022-01-25 10:13:53 +01:00
Nikita Popov aa97bc116d [NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or
Type::getNonOpaquePointerElementType().

This is part of D117885, in preparation for deprecating the API.
2022-01-25 09:44:52 +01:00
Chuanqi Xu 2a14bc55c5 [NFC] [C++20] [Modules] Update comments for handling friend
There is a comment contains a FIXME for the Module TS. And now the
Module TS is merged so we should update the comment. I've checked the
implementation.
2022-01-25 16:39:47 +08:00
Nikita Popov 9554aaa275 [Dwarf] Optimize getOrCreateSourceID() for repeated calls on same file (NFCI)
DwarfCompileUnit::getOrCreateSourceID() is often called many times
in sequence with the same DIFile. This is currently very expensive,
because it involves creating a string from directory and file name
and looking it up in a string map. This patch remembers the last
DIFile and its ID and directly returns that.

This gives a geomean -1.3% compile-time improvement on CTMark O0-g.

Differential Revision: https://reviews.llvm.org/D118041
2022-01-25 09:27:11 +01:00
Martin Storsjö 70cb8daed4 [X86] [CodeView] Add codeview mappings for registers ST0-ST7
These can end up needed after https://reviews.llvm.org/D116821.

Suggested by Alexandre Ganea.

Differential Revision: https://reviews.llvm.org/D118072
2022-01-25 10:09:06 +02:00
Lorenzo Chelini bca2d85153 [MLIR][Interfaces] Silence -Wparentheses warning (NFC)
warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
2022-01-25 09:02:49 +01:00
River Riddle 881ff4e4eb [mlir] Remove unnecessary dependency on Tensor from MemRef 2022-01-24 22:59:01 -08:00
Shraiysh Vaishay 320dc8c4df [mlir][OpenMP] Added omp.atomic.capture operation
This patch supports the atomic construct (capture) following section 2.17.7 of OpenMP 5.0 standard. Also added tests for the same.

Reviewed By: peixin, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D115851
2022-01-25 12:25:54 +05:30
Liu, Chen3 f6984b299a Fix the wrong value of bit_AVXVNNI
Differential Revision: https://reviews.llvm.org/D118103
2022-01-25 14:41:23 +08:00
Max Kazantsev c913dccfde [SCEV] Use lshr in implications
This patch adds support for implication inference logic for the
following pattern:
```
  lhs < (y >> z) <= y, y <= rhs --> lhs < rhs
```
We should be able to use the fact that value shifted to right is
not greater than the original value (provided it is non-negative).

Differential Revision: https://reviews.llvm.org/D116150
Reviewed-By: apilipenko
2022-01-25 13:25:19 +07:00
River Riddle 633f5badbf [mlir] Add more missing dependencies after D118062
These used to be covered transitively, but now need to be explicit.
2022-01-24 22:12:03 -08:00
Uday Bondhugula 8676e10f74 [MLIR] Improve doc for -mlir-print-local-scope and unhide
This is a pretty important debugging option to stay hidden. Also,
improve its cmd-line description; the current description gives no hint
that this is the one to use to have locations printed inline.
Out-of-line locations are also unproductive to work with in many cases
where the locations are actually compact, which is also why this option
should be more visible.  This revision doesn't change the default on it
though.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D117186
2022-01-25 11:13:48 +05:30
River Riddle e697b97148 [mlir] Add more missing dependencies after D118062
These used to be covered transitively, but now need to be explicit.
2022-01-24 21:36:31 -08:00
River Riddle b827b6340b [mlir] Add missing dependencies after D118062
These used to be covered transitively, but now need to be explicit.
2022-01-24 21:31:37 -08:00
Jordan Rupprecht 71cb5ed03c [bazel] Update MLIR deps
I believe this is due to D117839, D117848, maybe others.

Latest build failure: https://buildkite.com/llvm-project/upstream-bazel-rbe/builds/18053
2022-01-24 21:24:36 -08:00
River Riddle 61b81e0f49 [mlir:MLIRAffineUtils] Add missing dependency on MLIRAffineAnalysis
This was missed in a70aa7bb0d.
2022-01-24 21:23:39 -08:00