Vitaly Buka [Sat, 3 Sep 2022 21:07:28 +0000 (14:07 -0700)]
[test][mlir] Restore used attributes deleted by D132726
Nick Kreeger [Sat, 3 Sep 2022 20:47:40 +0000 (15:47 -0500)]
Revert "[mlir][sparse] Expose SparseTensor passes as enums instead of opaque"
This reverts commit
ef25b5d93d0b5621eb5d0482abd30a4e127e9223.
Nick Kreeger [Sat, 3 Sep 2022 20:45:49 +0000 (15:45 -0500)]
[mlir][sparse] Expose SparseTensor passes as enums instead of opaque
numbers for vectorization and parallelization options.
The SparseTensor passes currently use opaque numbers for the CLI,
despite using an enum internally. This patch exposes the enums instead
of numbered items that are matched back to the enum.
Fixes https://github.com/llvm/llvm-project/issues/53389
Differential Revision: https://reviews.llvm.org/D123876
Please also see:
https://reviews.llvm.org/D118379
https://reviews.llvm.org/D117919
Vitaly Buka [Sat, 3 Sep 2022 20:12:49 +0000 (13:12 -0700)]
Revert "[Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type"
Breakes windows bot.
This reverts commit
3ad2fe913ae08ca062105731ad2da2eae825c731.
Ye Luo [Sat, 3 Sep 2022 18:27:33 +0000 (13:27 -0500)]
[OpenMP] add a offload test involving std::complex
Taken from the https://github.com/llvm/llvm-project/issues/57064 reproducer.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D133258
Kazu Hirata [Sat, 3 Sep 2022 18:17:49 +0000 (11:17 -0700)]
[llvm] Qualify auto in range-based for loops (NFC)
Identified with readability-qualified-auto.
Kazu Hirata [Sat, 3 Sep 2022 18:17:47 +0000 (11:17 -0700)]
Drop empty string literals from static_assert (NFC)
Identified with modernize-unary-static-assert.
Kazu Hirata [Sat, 3 Sep 2022 18:17:45 +0000 (11:17 -0700)]
[llvm] Use std::remove_const_t (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:44 +0000 (11:17 -0700)]
[llvm] Use std::enable_if_t (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:42 +0000 (11:17 -0700)]
[ADT] Use std::add_const_t (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:40 +0000 (11:17 -0700)]
[llvm] Use range-based for loops (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:38 +0000 (11:17 -0700)]
Use llvm::upper_bound (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:37 +0000 (11:17 -0700)]
Use llvm::lower_bound (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:35 +0000 (11:17 -0700)]
Use llvm::count_if (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:33 +0000 (11:17 -0700)]
[CodeGen] Use std::lcm (NFC)
Kazu Hirata [Sat, 3 Sep 2022 18:17:32 +0000 (11:17 -0700)]
[BOLT] Use range-based for loops (NFC)
LLVM Coding Standards discourage for_each unless callable objects
already exist.
Fangrui Song [Sat, 3 Sep 2022 17:57:29 +0000 (10:57 -0700)]
[Driver] Remove unused -Ttext -Tdata -Tbss
They lead to -Wunused-command-line-argument and should be written as -Ttext=
instead, but the driver options end with a space. -Ttext=0 can be accepted by
the JoinedOrSeparate -T, so the JoinedOrSeparate -Ttext/etc are unneeded.
Fangrui Song [Sat, 3 Sep 2022 17:45:30 +0000 (10:45 -0700)]
[Driver] Change some cc1 only JoinedOrSeparate long options to Separate
They are error-prone as they do not end with `=`.
Note: for driver -isystem/etc, we have to support the Joined form.
Simon Pilgrim [Sat, 3 Sep 2022 17:45:04 +0000 (18:45 +0100)]
[CostModel][X86] Adjust mul v4i32/v8i32 throughput cost
Based off the numbers from AMD SoG + Agner - vXi32 are both half-rate, and znver1 double-pumps the v8i32 op
We should have caught this earlier as many Intel models have half-rate pmulld already :-(
Simon Pilgrim [Sat, 3 Sep 2022 16:18:26 +0000 (17:18 +0100)]
[CostModel][X86] Add CostKinds handling for add/sub ops
This was achieved using the 'cost-tables vs llvm-mca' script D103695
Dave Lee [Thu, 1 Sep 2022 17:30:38 +0000 (10:30 -0700)]
[lldb][bindings] Fix module_access handling of regex
Fixes broken support for: `target.module[re.compile("libFoo")]`
There were two issues:
1. The type check was expecting `re.SRE_Pattern`
2. The expression to search the module path had a typo
In the first case, `re.SRE_Pattern` does not exist in Python 3, and is replaced
with `re.Pattern`.
While editing this code, I changed the type checks to us `isinstance`, which is
the conventional way of type checking.
From the docs on `type()`:
> The `isinstance()` built-in function is recommended for testing the type of an object, because it takes subclasses into account.
Differential Revision: https://reviews.llvm.org/D133130
yronglin [Sat, 3 Sep 2022 15:24:37 +0000 (23:24 +0800)]
[Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type
Avoid __builtin_assume_aligned crash when the 1st arg is array type(or string literal).
Open issue: https://github.com/llvm/llvm-project/issues/57169
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D133202
Simon Pilgrim [Sat, 3 Sep 2022 14:48:33 +0000 (15:48 +0100)]
[CostModel][X86] Add CostKinds handling for fdiv ops
This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695
As we're using 'typical' worst case values, not all cost entries come from a single CPU - e.g. the latency/throughput from haswell but the size-latency(uops) from zen1/alderlake-e due to 'double pumping'
As the uop count (used for TCK_SizeAndLatency) for divss/divps is typically so low, we need to override isExpensiveToSpeculativelyExecute to ensure we keep fdiv calls behind branches - although for some very recent cpu targets it might not be necessary any more and could be relaxed.
Sanjay Patel [Sat, 3 Sep 2022 14:12:13 +0000 (10:12 -0400)]
[SCCP] add helper function for replacing signed operations; NFC
Preliminary refactoring for planned enhancement in D133198.
Simon Pilgrim [Sat, 3 Sep 2022 14:23:41 +0000 (15:23 +0100)]
[X86] Fix fdiv throughput/latency/uops counts
Matches znver1/2 numbers from AMD SoG + Agner - no additional uops for folded instructions and znver1 double pumps 256-bit vectors
Matches skylake/icelake throughput numbers from Intel AoM + Agner/instlatx64
Noticed while adding fdiv CostKinds support
Christian Sigg [Sat, 3 Sep 2022 07:15:34 +0000 (09:15 +0200)]
[MLIR] Single lit config attribute for CMAKE_LIBRARY_OUTPUT_DIRECTORY
Replace the following config attributes with `mlir_lib_dir`:
- `mlir_runner_utils_dir`
- `linalg_test_lib_dir`
- `spirv_wrapper_library_dir`
- `vulkan_wrapper_library_dir`
- `mlir_integration_test_dir`
I'm going to clean up substitutions in separate changes.
Reviewed By: aartbik, mehdi_amini
Differential Revision: https://reviews.llvm.org/D133217
Sanjay Patel [Sat, 3 Sep 2022 12:57:00 +0000 (08:57 -0400)]
[InstCombine] reduce another or-xor bitwise logic pattern
~(A & ?) | (A ^ B) --> ~((A & ?) & B)
https://alive2.llvm.org/ce/z/mxex6V
This is similar to
9d218b61cc50 where we peeked through
another logic op to find a common operand.
Sanjay Patel [Fri, 2 Sep 2022 19:03:13 +0000 (15:03 -0400)]
[InstCombine] add tests for or-xor-nand; NFC
Simon Pilgrim [Sat, 3 Sep 2022 13:08:25 +0000 (14:08 +0100)]
[CostModel][X86] Add fdiv(double) throughput x87 costs for
Simon Pilgrim [Sat, 3 Sep 2022 12:47:41 +0000 (13:47 +0100)]
[AMDGPU] Add -verify-machineinstrs to attr-amdgpu-flat-work-group-size* tests
These were affected by D131825 (and reported on Issue #57149) - adding the verification will help ensure that we don't hit this again on builds with EXPENSIVE_CHECKS enabled
Simon Pilgrim [Sat, 3 Sep 2022 12:41:33 +0000 (13:41 +0100)]
[DAG] canCreateUndefOrPoison - add freeze(insert_subvector(x,y,c)) -> insert_subvector(freeze(x),freeze(y),c) support
We already have plenty of assertions in place to ensure that the insertion index is constant and inrange
Simon Pilgrim [Sat, 3 Sep 2022 12:27:08 +0000 (13:27 +0100)]
[X86] Add test showing failure to fold freeze(insert_subvector(x,y,c)) -> insert_subvector(freeze(x),freeze(y),c)
If at least one of x and y are known never poison.
Simon Pilgrim [Sat, 3 Sep 2022 12:12:15 +0000 (13:12 +0100)]
[TTI] Add isExpensiveToSpeculativelyExecute wrapper
CGP uses a raw `getInstructionCost(I, TargetTransformInfo::TCK_SizeAndLatency) >= TCC_Expensive` check to see if its better to move an expensive instruction used in a select behind a branch instead.
This is causing issues with upcoming improvements to TCK_SizeAndLatency costs on X86 as we need to use TCK_SizeAndLatency as an uop count (so its compatible with various target-specific buffer sizes - see D132288), but we can have instructions that have a low TCK_SizeAndLatency value but should still be treated as 'expensive' (FDIV for example) - by adding a isExpensiveToSpeculativelyExecute wrapper we can keep the current behaviour but still add an x86 override in a future patch when the cost tables are updated to compensate.
Igor Zhukov [Sat, 3 Sep 2022 11:49:50 +0000 (18:49 +0700)]
[libc++] Implement P2273R3 (`constexpr` `unique_ptr`)
Reviewed By: mordante, #libc
Differential Revision: https://reviews.llvm.org/D131315
Mark de Wever [Sat, 3 Sep 2022 11:35:48 +0000 (13:35 +0200)]
[NFC][libc++] Uses the new way to mark Standard includes.
Mark de Wever [Sat, 3 Sep 2022 11:34:14 +0000 (13:34 +0200)]
[NFC][libc++][format] Removes unused code.
The code was for backwards compatibility with code no longer present in
format.
Mark de Wever [Sat, 3 Sep 2022 11:20:10 +0000 (13:20 +0200)]
[NFC][libc++] Removes GCC-11 support.
GCC-11 isn't supported in libc++ so remove UNSUPPORTED directives.
Simon Pilgrim [Sat, 3 Sep 2022 10:10:51 +0000 (11:10 +0100)]
[X86] Fix fmul throughput/latency/uops counts
Matches numbers from AMD SoG + Agner - should always be on FPU Pipes 0+1, no additional uops for folded instructions and znver1 double pumps 256-bit vectors and is always latency = 4cy for f64 multiplies
Noticed while adding fmul CostKinds support to the x86 cost models in rG0735200e3f50 and znver1 wasn't being flagged as requiring 2uop for 256-bit vectors
Simon Pilgrim [Sat, 3 Sep 2022 09:42:20 +0000 (10:42 +0100)]
[CostModel][X86] Add CostKinds handling for fmul ops
This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695
As we're using 'typical' worst case values, not all cost entries come from a single CPU - e.g. the latency/throughput from haswell but the size-latency(uops) from zen1/alderlake-e due to 'double pumping'
Simon Pilgrim [Sat, 3 Sep 2022 08:59:14 +0000 (09:59 +0100)]
[CostModel][X86] Remove unused float x87 costs
We only need the double costs for SSE1 fallback
Junduo Dong [Sat, 3 Sep 2022 08:38:37 +0000 (01:38 -0700)]
Revert "[Clang] change default storing path of `-ftime-trace`"
This reverts commit
38941da066a7b785ba4771710189172e94e37824.
Junduo Dong [Sat, 3 Sep 2022 08:37:55 +0000 (01:37 -0700)]
Revert "[driver][clang] remove the check-time-trace test on the platform "PS4/PS5/Hexagon""
This reverts commit
39221ad55752c246bb8448a181847103432e12b2.
Alexey Lapshin [Wed, 31 Aug 2022 12:13:26 +0000 (15:13 +0300)]
[DWARFLinker] Refactor clang modules loading code.
Current implementation of registerModuleReference() function not only
"registers" module reference, but also clones referenced module
(inside loadClangModule()). That may lead to cloning the module with
incorrect options (registerModuleReference() examines module references
and additionally accumulates MaxDwarfVersion and accel tables info).
Since accumulated options may differ from the current values,
it is incorrect to clone modules before options are fully accumulated.
This patch separates "cloning" code from "registering" code. So,
that accumulating option is done in the "registering stage" and
"cloning" is done after all modules are registered and options accumulated.
It also adds a callback for loaded compile units which can be used for
D132755 and D132371(to allow doing options accumulation outside
of DWARFLinker).
Differential Revision: https://reviews.llvm.org/D133047
Mark de Wever [Sat, 3 Sep 2022 08:19:35 +0000 (10:19 +0200)]
[libc++] Fixes generated output CI job.
It seems there was another file with the same issue, which didn't show
up initially.
Mark de Wever [Fri, 2 Sep 2022 15:53:28 +0000 (17:53 +0200)]
[NFC][libc++] Moves transitive includes location.
As discussed in D132284 they will be moved to the end.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D133212
Mark de Wever [Sat, 3 Sep 2022 08:04:44 +0000 (10:04 +0200)]
[libc++] Fixes generated output CI job.
Benjamin Kramer [Sat, 3 Sep 2022 07:55:20 +0000 (09:55 +0200)]
Christian Sigg [Sat, 3 Sep 2022 06:49:51 +0000 (08:49 +0200)]
Resubmit "[MLIR] Remove unused config attributes from lit.site.cfg.py"
This resubmits commit 0816b62, reverted in commit 328bbab, but without removing the config.target_triple.
Lit checks UNSUPPORTED tags in the input against the config.target_triple (https://llvm.org/docs/TestingGuide.html#constraining-test-execution).
The original commit made the following bots start failing, because unsupported tests were no longer skipped:
- s390x: https://lab.llvm.org/buildbot/#/builders/199/builds/9247
- Windows: https://lab.llvm.org/buildbot/#/builders/13/builds/25321
- Sanitizer: https://lab.llvm.org/buildbot/#/builders/5/builds/27187
owenca [Thu, 1 Sep 2022 06:19:08 +0000 (23:19 -0700)]
[clang-format] Fix a bug in merging blocks with a wrapped l_brace
When the opening brace of a control statement block is wrapped, we
must check the previous line to determine whether to try to merge
the block.
Fixes #38639.
Fixes #48007.
Fixes #57421.
Differential Revision: https://reviews.llvm.org/D133093
Lang Hames [Sat, 3 Sep 2022 03:55:35 +0000 (20:55 -0700)]
[ORC-RT] Refactor ORC runtime CMake for future test tool(s).
We want to move functionality from the LLVM ORCTargetProcess library into the
ORC runtime, and this will mean implementing remote-executor testing tools
(like llvm-jitlink-executor and lli-child-target) in the ORC runtime.
This patch refactors the ORC runtime build system to introduce an
add_orc_tool function that can be used to add new test tools. The code is
modeled on existing functions for adding unit tests.
A placeholder orc-rt-executor tool and test are added to verify that the
config changes behave as expected.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D133084
Junduo Dong [Sat, 3 Sep 2022 02:45:26 +0000 (19:45 -0700)]
[driver][clang] remove the check-time-trace test on the platform "PS4/PS5/Hexagon"
One of the test cases in that test is designed to test the compiling
jobs with a linking stage, but the PS4/PS5/Hexagon platform requires
an external linker that isn't present.
So this test do not support the "PS4/PS5/Hexagon".
LLVM GN Syncbot [Sat, 3 Sep 2022 02:43:17 +0000 (02:43 +0000)]
[gn build] Port
bc8fd9c6335f
Vitaly Buka [Sat, 3 Sep 2022 02:35:10 +0000 (19:35 -0700)]
Revert "[libc++] Granularize the rest of memory"
Breaks buildbots.
This reverts commit
30adaa730c4768b5eb06719c808b2884fcf53cf3.
LLVM GN Syncbot [Sat, 3 Sep 2022 02:22:45 +0000 (02:22 +0000)]
[gn build] Port
3a49cffe3add
Igor Zhukov [Sun, 21 Aug 2022 15:21:08 +0000 (22:21 +0700)]
[libc++] Implement P2445R1 (`std::forward_like`)
Co-authored-by: A. Jiang <de34@live.cn>
Reviewed By: philnik, huixie90, #libc
Differential Revision: https://reviews.llvm.org/D132327
Richard Smith [Sat, 3 Sep 2022 02:08:04 +0000 (19:08 -0700)]
Work around Windows buildbot failure.
-fmodules-local-submodule-visibility and -fdelayed-template-parsing
don't work properly together because the template is parsed in the
visibility context of the wrong module.
Shafik Yaghmour [Sat, 3 Sep 2022 00:45:44 +0000 (17:45 -0700)]
[Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is not deleted before attempting to call DefineDefaultedFunction(...)
I discovered this additional bug at the end of working on D132906
In Sema::CheckCompletedCXXClass(...) uses a lambda CheckForDefaultedFunction to
verify each CXXMethodDecl holds to the expected invariants before passing them
on to CheckForDefaultedFunction.
It is currently missing a check that it is not deleted, this adds that check and
a test that crashed without this check.
This fixes: https://github.com/llvm/llvm-project/issues/57516
Differential Revision: https://reviews.llvm.org/D133177
Junduo Dong [Tue, 9 Aug 2022 05:04:38 +0000 (22:04 -0700)]
[Clang] change default storing path of `-ftime-trace`
1. This implementation change the default storing behavior of -ftime-trace only.
That is, if the compiling job contains the linking action, the executable file' s directory may be seem as the main work directory.
Thus the time trace files would be stored in the same directory of linking result.
By this approach, the user can easily get the time-trace files in the main work directory. The improved demo results:
```
$ clang++ -ftime-trace -o main.out /demo/main.cpp
$ ls .
main.out main-[random-string].json
```
2. In addition, the main codes of time-trace files' path inference have been refactored.
* The <path> of -ftime-trace=<path> is infered in clang driver
* After that, -ftime-trace=<path> can be added into clang's options
By this approach, the dirty work of path processing and judging can be implemented in driver layer, so that the clang may focus on its main work.
# $ clang -ftime-trace -o xxx.out xxx.cpp
Differential Revision: https://reviews.llvm.org/D131469
Mehdi Amini [Sat, 3 Sep 2022 01:43:21 +0000 (01:43 +0000)]
Revert "[mlir][cmake] Don't add dependencies on mlir-(generic-)headers"
This reverts commit
7691b69d5b2f5e9d8b210add22926335b3541444.
Bots are broken because we're missing CMake dependencies all around now.
Richard Smith [Sat, 3 Sep 2022 01:43:27 +0000 (18:43 -0700)]
Attempt to make AIX bot happier.
River Riddle [Fri, 2 Sep 2022 23:24:17 +0000 (16:24 -0700)]
[mlir:vscode] Add support for viewing and editing a bytecode file as .mlir
This commit adds support for interacting with a (valid) bytecode file in the same
way as .mlir. This allows editing, using all of the traditional LSP features, etc. but
still using bytecode as the on-disk serialization format. Loading a bytecode file this
way will fail if the bytecode is invalid, and saving will fail if the edited .mlir is invalid.
Differential Revision: https://reviews.llvm.org/D132970
Adrian Prantl [Sat, 3 Sep 2022 01:14:12 +0000 (18:14 -0700)]
Fix out-of-bounds memory access in test
Sheng [Sat, 3 Sep 2022 00:58:31 +0000 (08:58 +0800)]
[NFC][clang] LLVM_FALLTHROUGH => [[fallthrough]
Andrew Browne [Fri, 2 Sep 2022 19:12:16 +0000 (12:12 -0700)]
[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
Peiming Liu [Fri, 2 Sep 2022 20:31:47 +0000 (20:31 +0000)]
[mlir][sparse] Introduce sparse_tensor.storage operator to create a sparse tensor storage tuple
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D133231
Mehdi Amini [Fri, 2 Sep 2022 23:34:52 +0000 (23:34 +0000)]
Revert "[mlir][Tensor] Add rewrites to extract slices through `tensor.collape_shape`"
This reverts commit
5711957875738c1318f89afd7bf4be388f85a087.
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.
Volodymyr Sapsai [Fri, 2 Sep 2022 22:37:23 +0000 (15:37 -0700)]
[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
Richard Smith [Fri, 2 Sep 2022 23:18:12 +0000 (16:18 -0700)]
Revert "[AggressiveInstCombine] Lower Table Based CTTZ"
This reverts commit
fec01ee3f5244bb9a04bc4310fc892c56c5b6bab.
According to asan, this patch introduces a heap use after free.
Francis Visoiu Mistrih [Fri, 2 Sep 2022 23:05:31 +0000 (16:05 -0700)]
[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)
Richard Smith [Fri, 2 Sep 2022 21:47:05 +0000 (14:47 -0700)]
Add driver test for -fmodule-name and -fmodule-map-file use without -fmodules.
Jorge Gorbe Moya [Fri, 2 Sep 2022 19:59:39 +0000 (12:59 -0700)]
[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.
Francis Visoiu Mistrih [Thu, 1 Sep 2022 19:06:59 +0000 (12:06 -0700)]
[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
Alexander Shaposhnikov [Wed, 31 Aug 2022 09:13:21 +0000 (09:13 +0000)]
[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
isuckatcs [Thu, 4 Aug 2022 17:49:05 +0000 (19:49 +0200)]
[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
Alexander Shaposhnikov [Fri, 2 Sep 2022 22:19:06 +0000 (22:19 +0000)]
[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
Eli Friedman [Fri, 2 Sep 2022 22:17:55 +0000 (15:17 -0700)]
[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
jackh [Tue, 30 Aug 2022 05:56:45 +0000 (13:56 +0800)]
[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
Lei Zhang [Fri, 2 Sep 2022 21:47:31 +0000 (17:47 -0400)]
[mlir][spirv] Convert some 0-D vector extract/insertelement ops
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D133183
Mitch Phillips [Fri, 2 Sep 2022 21:39:05 +0000 (14:39 -0700)]
Revert "[MLIR] Remove unused config attributes from lit.site.cfg.py"
This reverts commit
0816b629c9da5aa8885c4cb3fbbf5c905d37f0ee.
Reason: Broke the sanitizer buildbots. More information available in the
original phabricator review: https://reviews.llvm.org/D132726
Manish Gupta [Fri, 2 Sep 2022 21:20:11 +0000 (21:20 +0000)]
[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
Lei Zhang [Fri, 2 Sep 2022 21:21:57 +0000 (17:21 -0400)]
[mlir][spirv] Support more max/min vector.reduction
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D133168
Lei Zhang [Fri, 2 Sep 2022 21:17:45 +0000 (17:17 -0400)]
[mlir][spirv] Add some folders for spv.CompositeExtract
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D133167
Alex Brachet [Fri, 2 Sep 2022 21:17:07 +0000 (21:17 +0000)]
[libc][NFC] clang-format
Lei Zhang [Fri, 2 Sep 2022 21:14:53 +0000 (17:14 -0400)]
[mlir][spirv] Add support for converting gpu.shuffle xor
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D133054
Lei Zhang [Fri, 2 Sep 2022 21:06:52 +0000 (17:06 -0400)]
[mlir][spirv] Define various spv.GroupNonUniformShuffle ops
Reviewed By: kuhar
Differential Revision: https://reviews.llvm.org/D133041
Lei Zhang [Fri, 2 Sep 2022 21:02:00 +0000 (17:02 -0400)]
[mlir][spirv] Fix MaxVersion for ops after supporting v1.6
Reviewed By: ThomasRaoux
Differential Revision: https://reviews.llvm.org/D133234
Valentin Clement [Fri, 2 Sep 2022 21:00:59 +0000 (23:00 +0200)]
[mlir][openacc][NFC] Fix typo
Cole [Fri, 2 Sep 2022 21:00:07 +0000 (21:00 +0000)]
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
Vitaly Buka [Fri, 2 Sep 2022 20:24:56 +0000 (13:24 -0700)]
[TEST][msan] Reformat RUN lines
Chris Bieneman [Fri, 2 Sep 2022 19:32:24 +0000 (14:32 -0500)]
[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
LLVM GN Syncbot [Fri, 2 Sep 2022 19:47:21 +0000 (19:47 +0000)]
[gn build] Port
30adaa730c47
Nikolas Klauser [Tue, 30 Aug 2022 15:43:14 +0000 (17:43 +0200)]
[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
Nikolas Klauser [Fri, 2 Sep 2022 14:24:11 +0000 (16:24 +0200)]
[libc++] Granularize the rest of memory
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D132790
Fangrui Song [Fri, 2 Sep 2022 19:40:00 +0000 (12:40 -0700)]
[Driver] Remove cc1 Separate form -fvisibility
Nikolas Klauser [Fri, 2 Sep 2022 14:20:28 +0000 (16:20 +0200)]
[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
Fangrui Song [Fri, 2 Sep 2022 19:36:44 +0000 (12:36 -0700)]
[test] Change cc1 -fvisibility to -fvisibility=
Nikolas Klauser [Fri, 2 Sep 2022 14:19:07 +0000 (16:19 +0200)]
[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
Nikolas Klauser [Thu, 1 Sep 2022 10:02:58 +0000 (12:02 +0200)]
[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
Jeff Niu [Thu, 1 Sep 2022 18:06:46 +0000 (11:06 -0700)]
[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
Jeff Niu [Fri, 2 Sep 2022 19:13:07 +0000 (12:13 -0700)]
[mlir][cf-to-llvm] Fix error message