15072 Commits

Author SHA1 Message Date
Nico Weber
86e66d2820 [gn] port 7003f7d23aeca 2025-04-01 14:36:50 -07:00
Matt Arsenault
f60eed9344
llvm-reduce: Add target-features-attr reduction (#133887)
Try to reduce individual subtarget features in the "target-features"
attribute. This attempts a textual removal of the fields in the string,
not a semantic removal. Typically there's a lot of redundant feature spam
in the feature list implied by the target-cpu (which I really wish clang
would stop emitting). If we could parse these out, we could easily drop
the fields without testing anything.
2025-04-02 00:03:43 +07:00
Florian Hahn
9e5bfbf77d
[EquivalenceClasses] Update member_begin to take ECValue (NFC).
Remove a level of indirection and update code to use range-based for
loops.
2025-04-01 09:28:46 +01:00
Craig Topper
40c859a704
[TableGen] Use size returned by encodeULEB128 to simplify some code. NFC (#133750)
We can use the length to insert all the bytes at once instead of
partially decoding them to insert one byte at a time.
2025-03-31 15:58:36 -07:00
LLVM GN Syncbot
b91f978647 [gn build] Port 50949ebf523c 2025-03-31 15:20:59 +00:00
Kazu Hirata
6257621f41
[llvm] Use llvm::append_range (NFC) (#133658) 2025-03-30 18:43:02 -07:00
Kazu Hirata
2c73711995
[TableGen] Use llvm::append_range (NFC) (#133649) 2025-03-30 12:21:38 -07:00
Tim Gymnich
1d0005a69a
[GlobalISel][NFC] Rename GISelKnownBits to GISelValueTracking (#133466)
- rename `GISelKnownBits` to `GISelValueTracking` to analyze more than
just `KnownBits` in the future
2025-03-29 11:51:29 +01:00
LLVM GN Syncbot
4324f236ac [gn build] Port c8a70f4c6e24 2025-03-28 23:58:46 +00:00
Tim Gymnich
049f179606
[Analysis][NFC] Extract KnownFPClass (#133457)
- extract KnownFPClass for future use inside of GISelKnownBits

---------

Co-authored-by: Matt Arsenault <arsenm2@gmail.com>
2025-03-28 18:10:02 +01:00
Jay Foad
a983c3b209
[TableGen] Make more use of CodeGenRegisterClass::EnumValue. NFC. (#132749) 2025-03-28 15:54:53 +00:00
Kazu Hirata
673f4705a8
[llvm] Use *Set::insert_range (NFC) (#133353)
We can use *Set::insert_range to collapse:

  for (auto Elem : Range)
    Set.insert(E.first);

down to:

  Set.insert_range(llvm::make_first_range(Range));

In some cases, we can further fold that into the set declaration.
2025-03-27 20:44:20 -07:00
Craig Topper
ebe1ece4bb
[TableGen][RISCV] Support sub-operands in CompressInstEmitter.cpp. (#133039)
I'm looking into using sub-operands for memory operands. This would use
MIOperandInfo to create a single operand that contains a register and
immediate as sub-operands. We can treat this as a single operand for
parsing and matching in the assembler. I believe this will provide some
simplifications like removing the InstAliases we need to support "(rs1)"
without an immediate.

Doing this requires making CompressInstEmitter aware of sub-operands.

I've chosen to use a flat list of operands in the CompressPats so each
sub-operand is represented individually.
2025-03-27 19:10:40 -07:00
LLVM GN Syncbot
a42342265f [gn build] Port d8e44a9ab290 2025-03-27 22:51:31 +00:00
LLVM GN Syncbot
64178316cf [gn build] Port 59d06071e9b5 2025-03-27 15:47:30 +00:00
LLVM GN Syncbot
533f85ae05 [gn build] Port 9c18edc62123 2025-03-26 21:47:43 +00:00
Jay Foad
38aac86a24
[TableGen] Speed up inferMatchingSuperRegClass. NFC. (#133060)
SubToSuperRegs was a DenseMap of std::vectors, where the vectors
typically had size 1. Switching to a vector of pairs avoids the overhead
of allocating tiny vectors.

I measured a 1.14x speed-up building AMDGPUGenRegisterInfo.inc with this
patch.
2025-03-26 21:40:58 +00:00
Peter Collingbourne
1c8075c612 gn build: Port 0d2c55cb9682 2025-03-25 18:40:03 -07:00
Midhunesh
d75a40a9c1
Add cmake option to enable/disable searching PATH for symbolizer (#129012)
Introduced a cmake option that is disabled by default that suppresses
searching via the PATH variable for a symbolizer. The option will be
enabled for downstream builds where the user will need to specify the
symbolizer path more explicitly, e.g., by using ASAN_SYMBOLIZER_PATH.
2025-03-25 16:29:35 -07:00
Pete Chou
a074831cd9
[TableGen] Inherit properties from the nearest allocatable superclass. (#127018)
Previously isAlocatable was updated to allow inheritance from any
superclass for a generated register class, but other properties are
still inherited from its nearest superclass. This could cause
a generated regclass inherit undesired properties, e.g., tsflags, from
an unallocatable superclass due to the topological inheritance order.

This change updates to inherit properties from the nearest allocatable
superclass if possible and includes a test to demonstrate a potential
incorrect inheritance of tsflags.
2025-03-25 15:54:06 -05:00
LLVM GN Syncbot
0adc672ed4 [gn build] Port 9a82f742b497 2025-03-24 21:56:36 +00:00
Min-Yih Hsu
7fa104ed20
[TableGen][MCSched] Update error messages on the range of Acquire/ReleaseAtCycle (#131908)
I was looking at the value range of AcquireAtCycle / ReleaseAtCycle, and
I noticed that while the TableGen error messages said AcquireAtCycle has
to be less than ReleaseAtCycle, in reality they are actually allowed to
be the same. This patch fixes it and add more test cases.
2025-03-24 13:42:28 -07:00
Peter Collingbourne
11044de3dc Reapply "lit: Move RUN at line comment after the command."
This reverts commit 57e89c97c2c1b4e41f07a90c2f4d36649696e619.

Updated lit tests.
2025-03-24 12:01:49 -07:00
LLVM GN Syncbot
a76f678849 [gn build] Port f7a32b85b56b 2025-03-24 18:53:27 +00:00
LLVM GN Syncbot
d319cc84e4 [gn build] Port 7f920e2e5f70 2025-03-24 18:53:27 +00:00
LLVM GN Syncbot
9201e4a086 [gn build] Port 30bb0c443e16 2025-03-24 18:53:26 +00:00
LLVM GN Syncbot
590a5978d6 [gn build] Port 2f1416bbcde8 2025-03-24 18:53:25 +00:00
LLVM GN Syncbot
7aab2889d7 [gn build] Port 03557169e0ad 2025-03-24 18:53:24 +00:00
Peter Collingbourne
57e89c97c2 Revert "lit: Move RUN at line comment after the command."
This reverts commit 8d3dc1ed5656a3e69e4195d58684a7f4bf0ff5cc.

Test needs to be updated.
2025-03-24 11:47:56 -07:00
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