Commit Graph

444619 Commits

Author SHA1 Message Date
Roman Lebedev
1e2c548150 [NFC] Port all LICM tests to -passes= syntax 2022-12-08 02:38:45 +03:00
Roman Lebedev
8205a68da8 [NFC] Port all LCSSA tests to -passes= syntax 2022-12-08 02:38:45 +03:00
Roman Lebedev
b487f2e96f [NFC] Port all JumpThreading tests to -passes= syntax 2022-12-08 02:38:45 +03:00
Roman Lebedev
5b4b842ffb [NFC] Port all InstSimplify tests to -passes= syntax 2022-12-08 02:38:45 +03:00
Roman Lebedev
230129ab75 [NFC] Port all InstMerge tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
5fb9e84047 [NFC] Port all InstCombine tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
67bbdd05c4 [NFC] Port all IndVarSimplify tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
0ec421d024 [NFC] Port all IRCE tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
42e2512479 [NFC] Port all GuardWidening tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
d579885e32 [NFC] Port all GlobalOpt tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
08cb876024 [NFC] Port all GlobalDCE tests to -passes= syntax 2022-12-08 02:38:44 +03:00
Roman Lebedev
2adab06db9 [NFC] Port all GVNSink tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
4d16d036f7 [NFC] Port all GVNHoist tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
c67f0701bb [NFC] Port all GVN tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
a1314b2f62 [NFC] Port all FunctionSpecialization tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
091aabc181 [NFC] Port all FunctionAttrs tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
d87e607e47 [NFC] Port all ForcedFunctionAttrs tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
77f2db23d0 [NFC] Port all Float2Int tests to -passes= syntax 2022-12-08 02:38:43 +03:00
Roman Lebedev
5dfee9c25f [NFC] Port all DivRemPairs tests to -passes= syntax 2022-12-08 02:38:42 +03:00
Roman Lebedev
c421210da2 [NFC] Port all DeadStoreElimination tests to -passes= syntax 2022-12-08 02:38:42 +03:00
Roman Lebedev
ccab5b7a39 [NFC] Port all DeadArgElim tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
641a684fa0 [NFC] Port all DFAJumpThreading tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
394a34b46c [NFC] Port all CrossDSOCFI tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
6d5ff9970b [NFC] Port all CorrelatedValuePropagation tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
c51e98929e [NFC] Port all Coroutines tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
27d1d8bcdb [NFC] Port all ConstraintElimination tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
33b939c3c8 [NFC] Port all ConstantHoisting tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
c626e39502 [NFC] Port all CodeExtractor tests to -passes= syntax 2022-12-08 02:38:41 +03:00
Roman Lebedev
6db544e1d4 [NFC] Port all CanonicalizeFreezeInLoops tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Roman Lebedev
54c4609f18 [NFC] Port all CallSiteSplitting tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Roman Lebedev
da02ecb302 [NFC] Port all BlockExtractor tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Roman Lebedev
f3a2595711 [NFC] Port all Attributor tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Roman Lebedev
679eaeb2f6 [NFC] Port all ArgumentPromotion tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Roman Lebedev
8f92fe83ca [NFC] Port all ADCE tests to -passes= syntax 2022-12-08 02:38:40 +03:00
Tue Ly
360b41c7ba [libc] Fix undefined behavior in UInt<>::shift_right.
Fix undefined behavior of left-shifting uint64_t by 64 in
`UInt<>::shift_right` implementation.

Reviewed By: michaelrj, sivachandra

Differential Revision: https://reviews.llvm.org/D139566
2022-12-07 18:38:08 -05:00
Akira Hatanaka
3738ce05a7 Add support for a backdoor driver option that enables emitting header
usage information in JSON to a file

Each line in the file is a JSON object that has the name of the main
source file followed by the list of system header files included
directly or indirectly from that file.

For example:

{"source":"/tmp/foo.c",
 "includes":["/usr/include/stdio.h", "/usr/include/stdlib.h"]}

To reduce the amount of data written to the file, only the system
headers that are directly included from a non-system header file are
recorded.

In order to emit the header information in JSON, it is necessary to set
the following environment variables:

CC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=only-direct-system

The following combination is equivalent to setting CC_PRINT_HEADERS=1:

CC_PRINT_HEADERS_FORMAT=textual CC_PRINT_HEADERS_FILTERING=none

Differential Revision: https://reviews.llvm.org/D137996
2022-12-07 15:30:19 -08:00
Krzysztof Parzyszek
49e75ebd85 [Bitcode(Reader|Writer)] Convert Optional to std::optional 2022-12-07 15:27:38 -08:00
bixia1
a0568eabaf [mlir][sparse] Add dependence on bufferization.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D139571
2022-12-07 15:18:36 -08:00
Mahesh Ravishankar
242d5b2ba4 [mlir][Transforms] Simplify region before simplifying operation in CSE.
This covers more options for CSE. It also ensures that two operations
that have same operands but different regions to begin with, but same
regions after `simplifyRegions`, don't get both added to the list of
`knownValues`.

Fixes #59135

Differential Revision: https://reviews.llvm.org/D139490
2022-12-07 23:11:14 +00:00
Leonard Chan
bcc4470bad [compiler-rt][hwasan] Let CheckAddressSized eventually call HandleTagMismatch on Fuchsia
Any hwasan tag checking done through runtime calls like __hwasan_mem* or
__hwasan_load/store* currently raise a sigtrap on a tag mismatch. Hwasan
dumps as much information it knows on the tag mismatch by placing
important values in specific registers before the brk and encoding the
access information in the optional argument supplied to the brk. If the
platform hwasan runs on uses signal handlers, then users can see the
typical pretty hwasan error report, but Fuchsia doesn't use signal
handlers, so it's left up to the platform exception handler to print all
this encoded information.

This patch attempts to enter the regular error reporting path via
HandleTagMismatch if a new macro CAN_GET_REGISTERS is set. For now this
is only defined for Fuchsia + aarch64, but can be expanded for other
platforms.

Differential Revision: https://reviews.llvm.org/D139377
2022-12-07 23:09:53 +00:00
Johannes Doerfert
f6e3a89cc0 [AMDGPU] Annotate the intrinsics to be default and nocallback
Differential Revision: https://reviews.llvm.org/D135155
2022-12-07 14:25:25 -08:00
Jakub Kuderski
bafc3a2b22 [mlir][arith] Fix comment typo. NFC. 2022-12-07 17:21:41 -05:00
Jakub Kuderski
28246b7e75 [mlir][arith] Rename addui_carry to addui_extended
The goal is to make the naming of the future `_extended` ops more
consistent. With unsigned addition, the carry value/flag and overflow
bit are the same, but this is not true when it comes to signed addition.

Also rename the second result from `carry` to `overflow`.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D139569
2022-12-07 17:15:56 -05:00
Jon Chesterfield
d77ae7f251 [amdgpu] Reimplement LDS lowering
Renames the current lowering scheme to "module" and introduces two new
ones, "kernel" and "table", plus a "hybrid" that chooses between those three
on a per-variable basis.

Unit tests are set up to pass with the default lowering of "module" or "hybrid"
with this patch defaulting to "module", which will be a less dramatic codegen
change relative to the current. This reflects the sparsity of test coverage for
the table lowering method. Hybrid is better than module in every respect and
will be default in a subsequent patch.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D139433
2022-12-07 22:02:54 +00:00
Alexander Belyaev
f6fb0a4f35 [mlir] Make patterns for folding tensor.empty optional.
At the moment, they are a part of EmptyOp::getCanonicalizationPatterns. When
extract_slice(tensor.empty) is rewritten as a new tensor.empty, it could
happen that we end up with two tensor.empty ops, since the original
tensor.empty can have two users. After bufferization such cases result in two
allocations.

Differential Revision: https://reviews.llvm.org/D139308
2022-12-07 23:01:34 +01:00
Simon Pilgrim
7bb16b0207 [llvm-exegesis][x86] Add test coverage for Issue #38507
Ensure that the PBLENDVBrr0 destination register is never xmm0
2022-12-07 21:52:17 +00:00
Bran Hagger
7a795c42ad Enable kmpc_atomic functions for arm64
Define the same kmpc_atomic functions for arm and arm64 that are defined for x86 and x64.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D139139
2022-12-07 23:38:12 +02:00
Chris Bieneman
c861ea8736 Generate DXIL Shader hash
DXIL shader bitcode is hashed and the hash is placed into the final
output object file in its own data part.

This change modifies the DXContainerGlobals pass to compute the shader
hash (just an MD5 of the bitcode) and put the shader hash data into a
global for the HASH part.

This also sets the hash flag as appropriate for if the hashed shader
contained debug information. There is additional handling required to
get debug information in shaders working correctly with our tooling,
but that will be addressed in subsequent patches.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D139357
2022-12-07 15:22:55 -06:00
Alexander Yermolovich
f2f8f70953 Revert "[llvm][dwwarf] Change CU/TU index to 64-bit"
This reverts commit 5ebd28f3e5.
2022-12-07 13:14:23 -08:00
Alexander Yermolovich
a77376479d Revert "[DWARFLibrary] Add support to re-construct cu-index"
This reverts commit a5bd76a6e3.
2022-12-07 13:14:11 -08:00