15043 Commits

Author SHA1 Message Date
Peter Collingbourne
8d3dc1ed56
lit: Move RUN at line comment after the command.
When a developer copy/pastes a failing command line into their
shell to rerun it, they have to manually delete the "RUN: at line
N:" prefix. To make life easier for such developers, let's make it
possible to copy/paste a command without needing to modify it while
still showing the line number in the output by moving the line number
to a comment at the end of the command line.

Reviewers: jroelofs, MaskRay

Reviewed By: jroelofs, MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/132485
2025-03-24 11:29:57 -07:00
Kazu Hirata
41b76119ec
[llvm] Use range constructors for *Set (NFC) (#132636) 2025-03-23 15:50:34 -07:00
Craig Topper
616737c386 [TableGen] Use std:vector instead of SmallVector for the list of CompressPatterns. NFC
There are very likely more than 4 compress patterns.
2025-03-22 15:33:55 -07:00
Peter Collingbourne
8d67d00a94
gn build: libcxx: Select the std_thread pstl backend.
In the CMake build the default pstl backend for libc++ when threads are
enabled is std_thread. By selecting the wrong backend we were triggering
some transitive_includes test failures.

Reviewers: aeubanks, nico

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/132455
2025-03-21 14:55:30 -07:00
Kazu Hirata
599005686a
[llvm] Use *Set::insert_range (NFC) (#132325)
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently
gained C++23-style insert_range.  This patch replaces:

  Dest.insert(Src.begin(), Src.end());

with:

  Dest.insert_range(Src);

This patch does not touch custom begin like succ_begin for now.
2025-03-20 22:24:06 -07:00
Arthur Eubanks
8e777ff5bb [gn build] Port 73cd84a90e07 2025-03-20 21:37:22 +00:00
Arthur Eubanks
3dc98087c8 [gn build] Port 08dda4dcbf64 2025-03-20 21:37:21 +00:00
Finn Plummer
ebe5c66060
[DXIL] Remove definition and any uses of DXIL Property (#130796)
- Remove definitions from DXIL.td and any emissions/definitions that
were previously planned to be used

See resolved issue for motivations of deletion

Resolves #126298
2025-03-20 11:30:22 -07:00
Peter Collingbourne
909bff82b0
gn build: libcxx: Sync file list and always define _LIBCPP_ABI_VERSION.
The CMake side always defines _LIBCPP_ABI_VERSION. If we do not, we will
at least get -Wundef warnings in the test suite (upgraded to errors)
and it looks like we will end up building the library incorrectly as well.

With that, most of the libc++ test suite passes (with a manually written
lit.site.cfg) aside from some parts related to C++ modules which we
don't support yet.

Reviewers: nico, aeubanks

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/132135
2025-03-20 10:50:49 -07:00
Nico Weber
5356a9bcbb [gn] port 3c657ceef9ced (llvm-ml64) 2025-03-20 13:38:51 -04:00
Nikita Popov
0738f70615
[Intrinsics] Add Intrinsic::getFnAttributes() (NFC) (#132029)
Most places that call Intrinsic::getAttributes() are only interested in
the function attributes, so add a separate function for that.

The motivation for this is that I'd like to add the ability to specify
range attributes on intrinsics, which requires knowing the function
type. This avoids needing to know the type for most attribute queries.
2025-03-20 09:20:39 +01:00
LLVM GN Syncbot
99997d717b [gn build] Port 7af0bfe62fff 2025-03-19 16:17:16 +00:00
LLVM GN Syncbot
bc646f4b30 [gn build] Port 056264b838df 2025-03-18 21:07:15 +00:00
LLVM GN Syncbot
64cf6f9721 [gn build] Port 127eb39a8ca9 2025-03-18 15:03:57 +00:00
Shilei Tian
d85a81b4e4
[OffloadBundler] Rework the ctor of OffloadTargetInfo to support AMDGPU's generic target (#122629)
The current parsing logic for the target string assumes it follows the
format `<kind>-<triple>-<target id>:<feature>`, such as
`hipv4-amdgcn-amd-amdhsa-gfx1030:+xnack`.
Specifically, it assumes that `<target id>` does not contain any `-`,
relying on `rsplit` for parsing.
However, this assumption breaks for AMDGPU's generic targets, which may
contain one or more `-`, such as `gfx10-3-generic` or `gfx12-generic`.
As a result, the existing approach using `rstrip` is no longer reliable.

This patch reworks the parsing logic to handle target strings more
robustly, including support for generic targets.
The bundler now strictly requires a 4-field target triple.
Additionally, a new Python helper function has been added to `config.py`
to normalize the target triple into the 4-field format when it is not,
ensuring tests pass reliably.
2025-03-18 10:09:37 -04:00
David Sherwood
194eceff43
update_test_checks: add new --filter-out-after option (#129739)
Whilst trying to clean up some loop vectoriser IR tests (see
test/Transforms/LoopVectorize/AArch64/partial-reduce-chained.ll
for example) a reviewer on PR #129047 suggested it would be
nice to have an option to stop generating CHECK lines after a
certain point. Typically when performing a transformation with
the loop vectoriser we don't usually care about any CHECK lines
generated for the scalar tail of the loop, since the scalar
loop is kept intact. Previously if you wanted to eliminate such
unwanted CHECK lines you had to run the update script, then
manually delete all the lines corresponding to the scalar loop.
This can be very time consuming if the tests ever need changing.

What I've tried to do here is add a new --filter-out-after
option alongside the existing --filter* options that provides
support for stopping the generation of any CHECK lines beyond
the line that matches the filter. With the existing filter
options we never generate CHECK-NEXT lines, but we still care
about ordering with --filter-out-after so I've amended the
code to ensure we treat this filter differently.
2025-03-18 09:46:43 +00:00
LLVM GN Syncbot
2443fe537f [gn build] Port af5abd9a682d 2025-03-17 18:49:27 +00:00
LLVM GN Syncbot
681b24132c [gn build] Port fbb8929c9d15 2025-03-17 17:14:11 +00:00
LLVM GN Syncbot
9b1ce477af [gn build] Port 57e36419b251 2025-03-17 07:24:08 +00:00
LLVM GN Syncbot
c3f6d2c024 [gn build] Port 3b1e18c2dba8 2025-03-17 07:12:11 +00:00
LLVM GN Syncbot
7598ceaf51 [gn build] Port c84d8e8f1c40 2025-03-14 18:34:15 +00:00
Frederik Harwath
6962cf1700
Rename ExpandLargeFpConvertPass to ExpandFpPass (#131128)
This is meant as a preparation for PR #130988 "[AMDGPU] Implement IR
expansion for frem instruction" which implements the expansion of
another instruction in this pass. The more general name seems more
appropriate given this change and quite reasonable even without it.
2025-03-14 13:11:45 +01:00
Ellis Hoag
2044dd07da
[InstrProf] Remove -forder-file-instrumentation (#130192) 2025-03-13 08:28:16 -07:00
Ebuka Ezike
c26ec7ea2a
[llvm][lit] fix writing results to --time-trace-output file (#130845)
This patch fixes an issue introduced with commit:
8507dbaec3
2025-03-13 13:51:13 +00:00
LLVM GN Syncbot
79a5974294 [gn build] Port 4dcba5e08dc9 2025-03-13 03:21:36 +00:00
LLVM GN Syncbot
e4a0fd5416 [gn build] Port be9ca85d64eb 2025-03-13 02:09:36 +00:00
LLVM GN Syncbot
5929de8c77 [gn build] Port 7790d69cce04 2025-03-12 19:29:18 +00:00
LLVM GN Syncbot
2c8e154ce8 [gn build] Port f10a8706a144 2025-03-12 13:16:55 +00:00
LLVM GN Syncbot
6af9fd9430 [gn build] Port 76d5a79bed00 2025-03-12 13:16:54 +00:00
LLVM GN Syncbot
1e58bdcc73 [gn build] Port 75f76d482cc2 2025-03-12 13:16:53 +00:00
Nico Weber
de34213a67 [gn] port ab6f470675ed 2025-03-12 09:16:06 -04:00
Nico Weber
6717a38bb5 [gn] port 3a7a9c928671 better 2025-03-12 09:15:40 -04:00
Phoebe Wang
ad704ff62b
[X86][NF] Switch the order of Inst and &Target.getInstruction(NewRec) (#130739)
Because Inst is ordered by Instruction ID.
2025-03-12 17:35:54 +08:00
Craig Topper
146ef7a5f4
[TableGen] Remove unnecessary const_cast and use range-based for loops. NFC (#130717)
In order to use a range-based loop, I reduced a needed const_cast to
only the one line that needed it.
2025-03-11 09:21:10 -07:00
Craig Topper
fd21d35178
[TableGen] Reduce the number of vectors passed to getIslands. NFC (#130402)
Combine the StartBits, EndBits, and FieldVals vectors into a single
vector of a struct that contains all 3 pieces of information.

Instead of storing EndBits, we store NumBits since that's what the users
want.

I've removed the BitNo variable as it was easy to construct calculate
from StartBit. I've also removed Num in favor of Islands.size().
2025-03-10 21:02:09 -07:00
Rahul Joshi
8f0293695f
[NFC][TableGen] Eliminate use of ConstRecIter from SubtargetEmitter (#130162)
- Eliminate use of `ConstRecIter` from `expandProcResources` by using `all_of()` to simplify the code.
2025-03-10 12:23:25 -07:00
LLVM GN Syncbot
754eeeaef1 [gn build] Port 0d2c55cb9682 2025-03-10 13:23:12 +00:00
LLVM GN Syncbot
fe93a2879c [gn build] Port b1ebfac1859c 2025-03-10 10:00:08 +00:00
Ryosuke Niwa
5c3b05996f
[alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (#128651)
Add a new WebKit checker for checking that lambda captures of CF types
use RetainPtr either when ARC is disabled or enabled, and those of NS
types use RetainPtr when ARC is disabled.
2025-03-09 14:59:46 -07:00
LLVM GN Syncbot
2e7a509237 [gn build] Port e85e29c2992b 2025-03-09 21:10:04 +00:00
LLVM GN Syncbot
3a727549ef [gn build] Port fd267082ee6d 2025-03-09 15:06:16 +00:00
LLVM GN Syncbot
a892a5dc5e [gn build] Port 1d763f383380 2025-03-09 00:08:36 +00:00
LLVM GN Syncbot
c182e9db1e [gn build] Port 2fb1f0322403 2025-03-08 18:56:13 +00:00
Craig Topper
bac490b0bc [TableGen] Use Register in FastISel output. NFC 2025-03-08 10:15:39 -08:00
LLVM GN Syncbot
a22a646eaa [gn build] Port a1b14dbc4740 2025-03-08 17:11:25 +00:00
LLVM GN Syncbot
e86c5a7b9d [gn build] Port 6d9dfd75e4df 2025-03-08 14:21:29 +00:00
Craig Topper
f2607df291 [TableGen] Use uint8_t for bit_value_t enum. NFC
This reduces the amount of space needed for vectors of bit_value_t
and allows the user of memset.

Also reorder the enum values so BIT_FALSE is 0 and BIT_TRUE is 1.
2025-03-07 23:22:45 -08:00
Craig Topper
d65719fab3 [TableGen] Use isUInt to simplify some asserts. NFC 2025-03-07 22:51:43 -08:00
Craig Topper
8370ac88af [TableGen] Remove push_back from loop. NFC
We can initialize the vector to the right size and then assign
over some entries in the loop.
2025-03-07 22:01:15 -08:00
Craig Topper
f578982490 [TableGen] Remove unnecessary const_cast. NFC 2025-03-07 21:52:29 -08:00