Commit Graph

478322 Commits

Author SHA1 Message Date
martinboehme
3eed23d31c [clang][dataflow] Remove DataflowAnalysisContext::flowConditionIsTautology(). (#69601)
It's only used in its own unit tests.
2023-10-23 08:18:12 +02:00
Owen Pan
0374bbba4c [clang-format] Add a new style for the clang-format source code (#69814) 2023-10-22 23:01:27 -07:00
Adrian Kuegel
cdf713cdb9 [mlir][Bazel] Add missing dependency. 2023-10-23 05:30:16 +00:00
Adrian Kuegel
2fe9a342a6 [mlir][SCF] Use getResult() instead of static_cast<Value>(). 2023-10-23 05:05:28 +00:00
Craig Topper
0b3f6ff3c4 [RISCV] Disable hasAllNBitUsers for vector types.
RISCVGenDAGISel.inc can call this before it checks the node type.
Ensure the type is scalar before wasting time to do the more
computationally expensive checks.

This also avoids an assertion if we hit a VMV_X_S instruction
which doesn't have a VL operand which vectorPseudoHasAllNBitUsers
expects.
2023-10-22 21:59:31 -07:00
Kazu Hirata
859b5c7325 [TextAPI] Use std::remove_reference_t (NFC) 2023-10-22 21:18:26 -07:00
Kazu Hirata
66a797102d [lldb] Use llvm::is_contained (NFC) 2023-10-22 21:18:25 -07:00
Kazu Hirata
a5dca533bd Use llvm::count (NFC) 2023-10-22 21:18:23 -07:00
Wang Pengcheng
1e43975652 [TableGen][NFC] Remove MultiClass argument and Scoper in QualifyName (#69297)
MultiClass argument is not used any more since aa84326.

Besides, for maintainability, we should put the implementation of
qualifying name in one place (that is `QualifyName` function), so
`Scoper` is removed and we use `IsMC` to indicate that we are in a
multiclass.
2023-10-23 11:22:15 +08:00
Wang Pengcheng
05b5188c12 [Clang][RISCV] Support CSRs in clobbered registers of inline assembly (#67646)
To match GCC's behaviors.

Fixes #67596
2023-10-23 11:15:20 +08:00
Chuanqi Xu
366ffbaf62 [C++20] [Modules] [Driver] Don't enable -fdelayed-template-parsing by default on windows with C++20 (#69431)
There are already 3 issues about the broken state of
-fdelayed-template-parsing and C++20 modules:
- https://github.com/llvm/llvm-project/issues/61068
- https://github.com/llvm/llvm-project/issues/64810
- https://github.com/llvm/llvm-project/issues/65027

The problem is more complex than I thought. I am not sure how to fix it
properly now. Given the complexities and -fdelayed-template-parsing is
actually an extension to support old MS codes, I think it may make sense
to not enable the -fdelayed-template-parsing option by default with
C++20 modules to give more user friendly experience. Users who still
want -fdelayed-template-parsing can specify it explicitly.

Also according to https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170, MSVC actually defaults to -fno-delayed-template-parsing (/Zc:twoPhase-
with MSVC CLI) if using C++20. So we match the behavior with MSVC here to
not enable -fdelayed-template-parsing by default after C++20.
2023-10-23 10:06:16 +08:00
Johannes Doerfert
86bb713142 [OpenMP][FIX] Enlarge thread state array, improve test and add second 2023-10-22 17:47:00 -07:00
Matthias Springer
4d80eff861 [mlir][bufferization] Ownership-based deallocation: Allow manual (de)allocs (#68648)
Add a new attribute `bufferization.manual_deallocation` that can be
attached to allocation and deallocation ops. Buffers that are allocated
with this attribute are assigned an ownership of "false". Such buffers
can be deallocated manually (e.g., with `memref.dealloc`) if the
deallocation op also has the attribute set. Previously, the
ownership-based buffer deallocation pass used to reject IR with existing
deallocation ops. This is no longer the case if such ops have this new
attribute.

This change is useful for the sparse compiler, which currently
deallocates the sparse tensor buffers by itself.
2023-10-23 09:45:33 +09:00
Hongtao Yu
7a3db658d9 [llvm-profgen] More tweaks to warnings (#68608)
Tweaking warnings more to avoid flooding user log.
2023-10-22 17:00:14 -07:00
Fangrui Song
a24418375a [CodeLayout] cache-directed sort: limit max chain size (#69039)
When linking an executable with a slightly larger executable,
ld.lld --call-graph-profile-sort=cdsort can be very slow (see #68638).
```
   4.6%  20.7Mi    .text.hot
   3.5%  15.9Mi    .text
   3.4%  15.2Mi    .text.unknown
```

Add cl option `cdsort-max-chain-size`, which is similar to
`ext-tsp-max-chain-size`, and set it to 128, to improve performance.

In `ld.lld @response.txt --threads=4 --call-graph-profile-sort=cdsort
--time-trace"
builds, the "Total Sort sections" time is measured as follows:

* -mllvm  -cdsort-max-chain-size=64: 1.321813
* -mllvm -cdsort-max-chain-size=128: 2.030425
* -mllvm -cdsort-max-chain-size=256: 2.927684
* -mllvm -cdsort-max-chain-size=512: 5.493106
* unlimited: 9 minutes

The rest part takes 6.8s.
2023-10-22 16:50:03 -07:00
Fangrui Song
8511ade505 [LegacyPM] Remove LowerExpectIntrinsicPass
Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
Many legacy passes have been removed in 2022.
2023-10-22 16:25:08 -07:00
cmtice
efb0e9c0bd [LLDB] Update breakpoint-command.test to use string instead of number. (#69796)
lldb/test/Shell/Breakpoint/breakpoint-command.test adds a python
command, to be executed when a breakpoint hits, that writes out a
number. It then runs, hits the breakpoint and checks that the number is
present exactly once.

The problem is that on some systems the test can be run in a filepath
that happens to contain the number (e.g. auto-generated directory
names). The number is then detected multiple times and the test fails.

This patch fixes the issue by using a string instead, particularly a
string with spaces, which is very unlikely to be auto-generated by any
system.
2023-10-22 15:42:55 -07:00
Kazu Hirata
9c5a5a421d [llvm] Stop including llvm/ADT/iterator_range.h (NFC)
Identified with misc-include-cleaner.
2023-10-22 15:41:18 -07:00
Justin Fargnoli
6833a3808f [mlir][DeadCodeAnalysis] Don't Require RegionBranchTerminatorOpInterface in visitRegionTerminator() (#69043)
Fix for a crash reported in #64975. 

The crash occurs in the cast located
[here](ece5dd101c/mlir/lib/Analysis/DataFlow/DeadCodeAnalysis.cpp (L262))
because `llvm.unreachable` doesn't implement
`RegionBranchTerminatorOpInterface`.

The crash is caused by `DeadCodeAnalysis` assuming that
`isa<RegionBranchOpInterface>(op->getParentOp())` implies
`isa<RegionBranchTerminatorOpInterface>(op)` in
`DeadCodeAnalysis::visit()`.

This patch tried to fix this by enabling the analysis to proceed
regardless of whether `op` is a `RegionBranchTerminatorOpInterface`.
2023-10-22 15:34:39 -07:00
Jonas Hahnfeld
508a697acd [JITLink] Allow multiple relocations at same offset in EHFrameEdgeFixer (#68252)
The pass only requires that it can determine a uniquely identified
target at some offsets. Multiple relocations at the same offset are fine
otherwise and will be required when adding exception handling support
for RISC-V.
2023-10-22 23:32:33 +02:00
Johannes Doerfert
9f3b06d8be [OpenMP][FIX] Fix memset oversight to partially unblock test
The tests "unoptimized" version is still broken, disabled for now.
2023-10-22 14:29:11 -07:00
Mehdi Amini
904c5b484e Apply clang-tidy fixes for misc-include-cleaner in AST.cpp (NFC) 2023-10-22 14:24:18 -07:00
Mehdi Amini
d2d93a3365 Apply clang-tidy fixes for misc-include-cleaner in AST.cpp (NFC) 2023-10-22 14:23:50 -07:00
Mehdi Amini
f58eabc60e Apply clang-tidy fixes for misc-include-cleaner in MLIRGen.cpp (NFC) 2023-10-22 14:23:50 -07:00
Mehdi Amini
cd71a2c5fa Apply clang-tidy fixes for misc-include-cleaner in Dialect.cpp (NFC) 2023-10-22 14:23:49 -07:00
Mehdi Amini
2f20e0ee73 Apply clang-tidy fixes for misc-include-cleaner in toyc.cpp (NFC) 2023-10-22 14:23:49 -07:00
Owen Pan
3e86cc4b86 [clang-format][NFC] Simplify the logic in a return statement 2023-10-22 13:46:32 -07:00
Johannes Doerfert
f3ff0a67be [OpenMP][FIX] Ensure test runs correct with (at least) 2 threads 2023-10-22 13:22:36 -07:00
Kazu Hirata
747e0d9f0a [compiler-rt] Use std::clamp (NFC) 2023-10-22 12:32:20 -07:00
Kazu Hirata
3af0ff99b1 [llvm] Stop including llvm/ADT/DepthFirstIterator.h (NFC)
Identified with misc-include-cleaner.
2023-10-22 12:15:46 -07:00
Kazu Hirata
aaa5f34b61 [lldb] Remove an unused using decl (NFC) 2023-10-22 11:57:23 -07:00
Kazu Hirata
935d8e12e0 [llvm] Stop including llvm/ADT/StringMap.h (NFC)
Identified misc-include-cleaner.
2023-10-22 11:53:56 -07:00
Jon Roelofs
461918e290 [CodeGen][Remarks] Add the function name to the stack size remark (#69346)
It is already present in the yaml, but missing from the printed
diagnostics.
2023-10-22 11:39:02 -07:00
Kazu Hirata
a9136f0ad9 [Utils] Use std::remove_pointer_t (NFC) 2023-10-22 10:42:20 -07:00
Kazu Hirata
6e18003a23 [llvm] Use llvm::any_of (NFC) 2023-10-22 10:42:18 -07:00
Kazu Hirata
5a98dd6734 [mlir] Remove an extraneous typename (NFC) 2023-10-22 10:42:16 -07:00
Kazu Hirata
3b7bfeb483 [llvm] Stop including llvm/ADT/SmallString.h (NFC)
Identified with misc-include-cleaner.
2023-10-22 10:42:15 -07:00
Jacques Pienaar
ce8b8b1639 [mlir][minimal-opt] Fix typo 2023-10-22 10:03:15 -07:00
SR_team
c3008842bf [clangd] Show alignment for records and fields decls (#67213)
Shows align for records and fields declarations in hover information.

Example:
```cpp
struct A {
  char a;
  short b;
};
```

For this struct hover informations shows:
```
Size: 4 bytes, alignment 2 bytes
```


![image](https://github.com/llvm/llvm-project/assets/12231048/a130b353-f3f6-4203-b0d7-3d592b7a7855)
2023-10-22 20:37:12 +04:00
Florian Hahn
4f56d47d05 [VPlan] Make ExpandedSCEVs argument const (NFC).
The argument is only used in const contexts. Simplifies a follow-up
diff.
2023-10-22 12:31:55 +01:00
Florian Hahn
0c8e5be6fa [VPlan] Simplify redundant trunc (zext A) pairs to A.
Add simplification for redundant trunc(zext A) pairs. Generally apply a
transform from D149903.

Depends on D159200.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D159202
2023-10-22 11:41:38 +01:00
LLVM GN Syncbot
4aeb7a0f5e [gn build] Port d2a46e6480 2023-10-22 08:26:17 +00:00
Nikolas Klauser
d2a46e6480 [libc++][PSTL] Implement std::move
Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155330
2023-10-22 10:25:49 +02:00
Stanislav Mekhanoshin
3d40411ee8 [AMDGPU] Set size to all SOP pseudos (#69756) 2023-10-22 00:33:45 -07:00
Brad Smith
a63dc79d11 [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (#68656) 2023-10-22 08:48:41 +03:00
Kazu Hirata
1f12223cf4 [llvm] Stop including Endian.h (NFC)
These files satisfy all of the following:

- misc-include-cleaner indicates that these files do not need
  Endian.h.
- They do not mention "endian" anywhere.
- They do not include any *.inc or *.def, which could need
  llvm::support::endian.
2023-10-21 22:23:02 -07:00
Madhur Amilkanthwar
0b7ae41b23 [LIT] Print discovered tests and percentages (#66057) (#69831)
This patch adds "nice-to-have" feature in lit.
it prints the total number of discovered tests at the beginning. It is
covenient to see the total number of tests and avoid scrolling up to the
beginning of log.

Further, this patch also prints %ge of tests.

This patch fixes tests pointed by previous attempt of landing this
patch.

Reviewed By: RoboTux, jdenny-ornl

Co-authored-by: Madhur A <madhura@nvidia.com>
2023-10-22 09:22:25 +05:30
Jakub Kuderski
00c8da6159 [docs] Fix suggested darker command in coding standards (#69860)
Do not attempt to format deleted files.
2023-10-21 21:33:40 -04:00
Finn Plummer
5aee156b2a Reland: "[mlir][index][spirv] Add conversion for index to spirv" (#69790)
Due to an issue when lowering from scf to spirv as there was no
conversion pass for index to spirv, we are motivated to add a conversion
pass from the Index dialect to the SPIR-V dialect. Furthermore, we add
the new conversion patterns to the scf-to-spirv conversion.

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

---------

Co-authored-by: Jeremy Kun <jkun@google.com>
2023-10-21 20:36:28 -04:00
Mehdi Amini
5e458f5aef Apply clang-tidy fixes for llvm-qualified-auto in IRNumbering.cpp (NFC) 2023-10-21 17:31:37 -07:00