Commit Graph

434955 Commits

Author SHA1 Message Date
Andrew Browne 64529eb291 [DFSan] Increase size of buffer to fix possibly-flakey test.
Observed a test failure where "Returned length: 3054".

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D133227
2022-09-02 17:52:12 -07:00
Peiming Liu c3aeb3e644 [mlir][sparse] Introduce sparse_tensor.storage operator to create a sparse tensor storage tuple
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133231
2022-09-03 00:08:29 +00:00
Mehdi Amini 0b1aee38bd Revert "[mlir][Tensor] Add rewrites to extract slices through `tensor.collape_shape`"
This reverts commit 5711957875.

A circular dependency is introduced here from Dialect/Utils/ to the
ViewLikeInterface, but it already depends on Dialect/Utils.

Also this introduces a dependency from lib/Dialect/Tensor to Linalg,
which isn't obviously correct from a layering point of view.
2022-09-02 23:34:52 +00:00
Volodymyr Sapsai 246c5a994b [ODRHash diagnostics] Transform method `ASTReader::diagnoseOdrViolations` into a class `ODRDiagsEmitter`. NFC.
Preparing to use diagnostics about ODR hash mismatches outside of ASTReader.

Differential Revision: https://reviews.llvm.org/D128490
2022-09-02 16:20:05 -07:00
Richard Smith 053841c562 Revert "[AggressiveInstCombine] Lower Table Based CTTZ"
This reverts commit fec01ee3f5.

According to asan, this patch introduces a heap use after free.
2022-09-02 16:19:09 -07:00
Francis Visoiu Mistrih c5b10f348e [Matrix] Use print instead of dump for matrix-print-after-transpose-opt
We should be able to use this option even if LLVM_ENABLE_DUMP is not on.

(should fix the bots too)
2022-09-02 16:12:21 -07:00
Richard Smith b484256f59 Add driver test for -fmodule-name and -fmodule-map-file use without -fmodules. 2022-09-02 16:08:30 -07:00
Jorge Gorbe Moya f021cb57ce [NFC] Remove duplicate code in SBTypeCategory
TypeCategoryImpl has its own implementation of these, so it makes no
sense to have the same logic inlined in SBTypeCategory.

There are other methods in SBTypeCategory that are directly implemented
there, instead of delegating to TypeCategoryImpl (which IMO kinda
defeats the point of having an "opaque" member pointer in the SB type),
but they don't have equivalent implementations in TypeCategoryImpl, so
this patch only picks the low-hanging fruit for now.
2022-09-02 16:04:04 -07:00
Francis Visoiu Mistrih 81bdb4068d [Matrix] Simplify matmuls with scalars
If one of the operands is a transposed splat, the transpose can be
removed.

This is useful to simplify when transposes are distributed to operands
of a matmul:

* k^T -> k
* (A * k)^t -> A^t * k

Differential Revision: https://reviews.llvm.org/D130177
2022-09-02 15:50:25 -07:00
Alexander Shaposhnikov a7395b860b [clang-tidy] Skip copy assignment operators with nonstandard return types
Skip copy assignment operators with nonstandard return types
since they cannot be defaulted.

Test plan: ninja check-clang-tools

Differential revision: https://reviews.llvm.org/D133006
2022-09-02 22:43:39 +00:00
isuckatcs b5147937b2 [analyzer] Add more information to the Exploded Graph
This patch dumps every state trait in the egraph. Also
the empty state traits are no longer dumped, instead
they are treated as null by the egraph rewriter script,
which solves reverse compatibility issues.

Differential Revision: https://reviews.llvm.org/D131187
2022-09-03 00:21:05 +02:00
Alexander Shaposhnikov 47dbacbc8a [clang-tidy] Restrict use-equals-default to c++11-or-later
Restrict use-equals-default to c++11-or-later.

Test plan: ninja check-all

Differential revision: https://reviews.llvm.org/D132998
2022-09-02 22:19:11 +00:00
Eli Friedman b219a9c0a2 [CostModel][AArch64] Fix ctpop intrinsic cost when NEON is disabled.
If we don't have NEON, we use the generic fallback, which takes 12
instructions. Make sure the costs reflect that.

(On a related note, we could optimize the generic fallback a bit. It
currently uses sequences like lsr+and+add; if we use and+lsr+add
instead, we can fold the lsr into the add.)

Differential Revision: https://reviews.llvm.org/D133154
2022-09-02 15:17:55 -07:00
jackh 3bbdf06b28 [clang-format] Fix annotating when deleting array of pointers
Fixes https://github.com/llvm/llvm-project/issues/57418

The token `*` below should be annotated as `UnaryOperator`.

```
delete[] *ptr;
```

Reviewed By: owenpan, MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D132911
2022-09-03 05:56:49 +08:00
Lei Zhang 53dac0980d [mlir][spirv] Convert some 0-D vector extract/insertelement ops
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D133183
2022-09-02 17:47:49 -04:00
Mitch Phillips 328bbab542 Revert "[MLIR] Remove unused config attributes from lit.site.cfg.py"
This reverts commit 0816b629c9.

Reason: Broke the sanitizer buildbots. More information available in the
original phabricator review: https://reviews.llvm.org/D132726
2022-09-02 14:40:28 -07:00
Manish Gupta fbf69f95b6 [mlir][NVGPU] Adding Support for cp_async_zfill via Inline Asm
`cp_async_zfill` is currently not present in the nvvm backend, this patch adds `cp_async_zfill` support by adding inline asm when lowering from `nvgpu` to `nvvm`.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D132269
2022-09-02 21:29:26 +00:00
Lei Zhang 0f6103af97 [mlir][spirv] Support more max/min vector.reduction
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D133168
2022-09-02 17:21:57 -04:00
Lei Zhang 217b5c50b9 [mlir][spirv] Add some folders for spv.CompositeExtract
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D133167
2022-09-02 17:20:58 -04:00
Alex Brachet 5c78c154df [libc][NFC] clang-format 2022-09-02 21:17:34 +00:00
Lei Zhang 5bb8b0fe7d [mlir][spirv] Add support for converting gpu.shuffle xor
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D133054
2022-09-02 17:14:53 -04:00
Lei Zhang 4c726d3bbf [mlir][spirv] Define various spv.GroupNonUniformShuffle ops
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D133041
2022-09-02 17:07:16 -04:00
Lei Zhang 1b5d97ddaa [mlir][spirv] Fix MaxVersion for ops after supporting v1.6
Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D133234
2022-09-02 17:05:58 -04:00
Valentin Clement 41c5efa850
[mlir][openacc][NFC] Fix typo 2022-09-02 23:01:22 +02:00
Cole fc1da043f4 use LLVM_USE_STATIC_ZSTD
removes LLVM_PREFER_STATIC_ZSTD in favor of using a LLVM_USE_STATIC_ZSTD

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D133222
2022-09-02 21:00:38 +00:00
Vitaly Buka acf141677e [TEST][msan] Reformat RUN lines 2022-09-02 13:41:24 -07:00
Chris Bieneman 00ecacca7d [HLSL] Generate buffer subscript operators
In HLSL buffer types support array subscripting syntax for loads and
stores. This change fleshes out the subscript operators to become array
accesses on the underlying handle pointer. This will allow LLVM
optimization passes to optimize resource accesses the same way any other
memory access would be optimized.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D131268
2022-09-02 14:55:43 -05:00
LLVM GN Syncbot 055721ff75 [gn build] Port 30adaa730c 2022-09-02 19:47:21 +00:00
Nikolas Klauser c747bd0e23 [libc++][NFC] Copy the whole union instead of a member; also remove __zero()
This doesn't affect code-gen

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D132951
2022-09-02 21:44:57 +02:00
Nikolas Klauser 30adaa730c [libc++] Granularize the rest of memory
Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D132790
2022-09-02 21:42:41 +02:00
Fangrui Song 2f7da9d317 [Driver] Remove cc1 Separate form -fvisibility 2022-09-02 12:40:00 -07:00
Nikolas Klauser cac9a6fb0e [libc++] Remove noexcept specifier from operator""s
For some reason `operator""s(const char8_t*, size_t)` was marked `noexcept`. Remove it and add regression tests.

Reviewed By: ldionne, huixie90, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D132340
2022-09-02 21:37:32 +02:00
Fangrui Song 74742147ee [test] Change cc1 -fvisibility to -fvisibility= 2022-09-02 12:36:44 -07:00
Nikolas Klauser 84fc2c3cd6 [libc++] Make the naming of private member variables consistent and enforce it through readability-identifier-naming
Reviewed By: ldionne, #libc

Spies: aheejin, sstefan1, libcxx-commits

Differential Revision: https://reviews.llvm.org/D129386
2022-09-02 21:36:36 +02:00
Nikolas Klauser 3c355e2881 [libc++] Enable [[nodiscard]] extensions by default
Adding `[[nodiscard]]` to functions is a conforming extension and done extensively in the MSVC STL.

Reviewed By: ldionne, EricWF, #libc

Spies: #libc_vendors, cjdb, mgrang, jloser, libcxx-commits

Differential Revision: https://reviews.llvm.org/D128267
2022-09-02 21:34:20 +02:00
Jeff Niu 7691b69d5b [mlir][cmake] Don't add dependencies on mlir-(generic-)headers
Every dialect was dependent on `mlir-headers`, which was causing the
build of any single MLIR dialect to pull in a bunch of extra
dependencies that aren't needed. Now, MLIR dialects will need to
explicitly depend on `MLIR*IncGen` targets to pull in any needed
headers.

This does not impact the actual `mlir-header` target.

Consider the "simple" Arithmetic dialect. Before:

```
% ninja MLIRArithmeticDialect
[151/812] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/JSONBackend.cpp.o
```

After:

```
% ninja MLIRArithmeticDialect
[207/374] Building CXX object tools/mlir/lib/TableGen/CMakeFiles/MLIRTableGen.dir/GenInfo.cpp.o
```

(Both clean builds)

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D133132
2022-09-02 12:13:49 -07:00
Jeff Niu bf7a74499c [mlir][cf-to-llvm] Fix error message 2022-09-02 12:13:19 -07:00
Alex Brachet e66a1a5a39 [libc][NFC] Use no_sanitize("all")
This function cannot have any instrumentation because it's
assembly must match exactly what the debugger is expecting.

Previously it was just a list of what sanitizers we expect
libc would be sanitized with but this is untenable.
2022-09-02 19:07:39 +00:00
Chris Bieneman 5b5329bd41 [NFC] Make MultiplexExternalSemaSource own sources
This change refactors the MuiltiplexExternalSemaSource to take ownership
of the underlying sources. As a result it makes a larger cleanup of
external source ownership in Sema and the ChainedIncludesSource.

Reviewed By: aaron.ballman, aprantl

Differential Revision: https://reviews.llvm.org/D133158
2022-09-02 13:57:39 -05:00
Fangrui Song 1491282165 [clang] Change cc1 -fvisibility's canonical spelling to -fvisibility= 2022-09-02 11:49:38 -07:00
Valentin Clement dc549bf001
[flang][docs] Add lowering design doc for parameterized derived-type
This document aims to give insights at the representation of parameterized
derived-type (PDTs) in FIR and how PDTs are lowered to FIR and interact
with the runtime.

Reviewed By: jeanPerier, klausler

Differential Revision: https://reviews.llvm.org/D133096
2022-09-02 20:45:57 +02:00
Valentin Clement 6b9b85b79d
[flang] Use APInt to lower 128 bits integer constants
Lowering was truncating 128 bits integer to 64 bits. This
patch makes use of APInt to lower 128 bits integer correctly.

```
program bug
  print *, 170141183460469231731687303715884105727_16
end

! Before patch: 18446744073709551615
! With patch: 170141183460469231731687303715884105727
```

Reviewed By: vdonaldson

Differential Revision: https://reviews.llvm.org/D133206
2022-09-02 20:44:56 +02:00
Valentin Clement c55bf52635
[flang] Make sure allocatable components are initialzed for temp derived-type
Runtime functions expect clean unallocated state for descriptor. This
patch adds a call to the runtime function to initialize the temporary
derived-type created.

Reviewed By: vdonaldson

Differential Revision: https://reviews.llvm.org/D133189
2022-09-02 20:43:38 +02:00
Chris Bieneman 10194a51a9 [HLSL] Restrict to supported targets
Someday we would like to support HLSL on a wider range of targets, but
today targeting anything other than `dxil` is likly to cause lots of
headaches. This adds an error and tests to validate that the expected
target is `dxil-?-shadermodel`.

We will continue to do a best effort to ensure the code we write makes
it easy to support other targets (like SPIR-V), but this error will
prevent users from hitting frustrating errors for unsupported cases.

Reviewed By: jcranmer-intel, Anastasia

Differential Revision: https://reviews.llvm.org/D132056
2022-09-02 13:36:23 -05:00
Peiming Liu 662ee93cbb [mlir][sparse] extend codegen test cases with an additional step after storage expansion
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133219
2022-09-02 18:34:15 +00:00
Peiming Liu 928b5b06f9 [mlir][sparse] add conversion rules for storage_get/set/callOp
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D133175
2022-09-02 18:27:54 +00:00
Sameer Sahasrabuddhe 46b293cb3f [Attributor] Simplify offset calculation for a constant GEP
Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D132931
2022-09-02 23:53:51 +05:30
Jeff Niu 607f14d960 [mlir][ods] Add ArrayOfAttr for creating custom array attributes
`ArrayOfAttr` can be used to easily create an attribute that just
contains an array of something. The elements can be other attributes,
in which case the custom parsers and printers are invoked directly for
nice syntax, or any C++ type that supports parsing and printing, either
though custom `printer` and `parser` methods or `FieldParser`.

An array of integers:

```
def ArrayOfInts : ArrayOfAttr<Test_Dialect, "ArrayOfInts", "array_of_ints",
                              "int32_t">;
```

When embedded in an op's assembly format, it will look like

```
foo.ints value = [1, 2, 3]
```

An array of enums, when embedded in an op's assembly format, will look
like:

```
foo.enums value = [first, second, last]
```

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D133131
2022-09-02 11:12:58 -07:00
Yuanfang Chen 041ec82242 [Verifier] Skip debug location check for some non-inlinable functions
If a callee function is not interposable, skip debug location check for its callsites. Doing this is instrumentation-friendly otherwise under some conditions this check triggers for some un-inlinable call sites.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D133060
2022-09-02 11:03:55 -07:00
Arthur Eubanks 57fd866551 [LoopPassManager] Implement and use LoopNestAnalysis::run() instead of manually creating LoopNests
The current code is basically just emulating what the analysis manager does.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D132581
2022-09-02 10:55:53 -07:00