Nico Weber
4a2d24e814
[gn] Reformat build files
...
Ran:
git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
No behavior change.
2024-09-24 20:22:36 -04:00
Rahul Joshi
bde2357f71
[LLVM][TableGen] Rename Option emitter files ( #109216 )
...
Rename OptXXXEmitter.cpp to OptionXXXEmitter.cpp to have a less
ambiguous
name, as `Opt` could also mean optimization.
2024-09-24 16:54:36 -07:00
Scott Egerton
396f677514
[AMDGPU] Remove unused VGPRSingleUseHintInsts feature ( #109769 )
2024-09-24 10:58:00 +01:00
Rahul Joshi
3138eb500c
[LLVM][TableGen] Use const record pointers in TableGen/Common files ( #109467 )
...
Use const record pointers in TableGen/Common files.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-23 13:07:31 -07:00
Brox Chen
2b892b0502
added a script to update llvm-mc test file ( #107246 )
...
Added a script to update the test file generated by llvm-mc binary. The
script accepts .s and .txt for asm and dasm.
For mc test I am targetting there is no function name which can be used
as a key, thus no clear mapping between input and output. The script
assumes the test are always line-by-line and it update the output marker
for each test line-by-line.
---------
Co-authored-by: Alexander Richardson <mail@alexrichardson.me>
2024-09-23 15:27:41 -04:00
Elvina Yakubova
c35ea627df
update_test_checks: recognize %if in RUN line ( #108972 )
...
Recognize %if for target-specific cases in RUN line and keep only tool
command with options
2024-09-23 12:44:42 +01:00
LLVM GN Syncbot
7e7009fc57
[gn build] Port a72d7eea5413
2024-09-23 10:01:18 +00:00
Craig Topper
eb8d865c44
[TableGen] Change getReg() == 0 to !getReg().isValid() in expandCheckInvalidRegOperand. NFC
2024-09-21 22:37:28 -07:00
LLVM GN Syncbot
86fb006e7f
[gn build] Port 8ec406757cb9
2024-09-21 19:08:19 +00:00
Rahul Joshi
a06529597c
[LLVM][TableGen] Change RegisterInfoEmitter to use const RecordKeeper ( #109237 )
...
Change RegisterInfoEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-20 12:39:23 -07:00
LLVM GN Syncbot
330ecf0c1a
[gn build] Port fb7849537601
2024-09-20 18:24:16 +00:00
Nico Weber
02071a8d83
Revert "[gn build] Port 64972834c193"
...
This reverts commit 98cf6560ab6df885b6e21463f6a0a1fa5cea1eea.
64972834c193 was reverted in 9c5ad62e7440
2024-09-20 11:23:43 -04:00
Rahul Joshi
7365b1c7bb
[TableGen] Eliminate use of convertInitializerTo
in SearchableTable ( #109206 )
...
Eliminate use of `convertInitializerTo` as that needs a non-const
RecordKeeper (which we want to make const).
2024-09-20 07:58:06 -07:00
Rahul Joshi
708567ab0b
[LLVM][TableGen] Adopt indent
for indentation ( #109275 )
...
Adopt `indent` for indentation DAGISelMatcher and DecoderEmitter.
2024-09-20 04:28:01 -07:00
Rahul Joshi
2b01452c20
[LLVM][TableGen] Use const Record pointers in PredicateExpander ( #109365 )
...
Use const Record pointers in PredicateExpander.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-20 04:23:52 -07:00
Rahul Joshi
d109636c2e
[LLVM][TableGen] Change GISelCombinerEmitter to use const RecordKeeper ( #109187 )
...
Change GISelCombinerEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-20 04:23:11 -07:00
Rahul Joshi
b594b93024
[LLVM][TableGen] Change DisassemblerEmitter to use const RecordKeeper ( #109177 )
...
Change DisassemblerEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-20 04:22:37 -07:00
Rahul Joshi
8a36eb83e5
[LLVM][TableGen] Change AsmMatcherEmitter to use const RecordKeeper ( #109174 )
...
Change AsmMatcherEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-20 04:20:52 -07:00
LLVM GN Syncbot
ce47e57161
[gn build] Port ea578804c81b
2024-09-20 06:54:08 +00:00
LLVM GN Syncbot
594efd2625
[gn build] Port 76883932014b
2024-09-20 00:19:16 +00:00
LLVM GN Syncbot
e2983e5ad3
[gn build] Port d2df2e41cae1
2024-09-19 22:28:18 +00:00
Thomas Fransham
283c2c8800
[TableGen] Add explicit symbol visibility macros to code generated ( #107873 )
...
Update llvm's TableGen to emit new explicit symbol visibility macros I
added in https://github.com/llvm/llvm-project/pull/96630 to the function
declarations it creates
The generated functions need to be exported from llvm's shared library
for Clang and some OpenMP tests. @compnerd
2024-09-19 12:42:46 -07:00
LLVM GN Syncbot
42eb19a260
[gn build] Port d1335fb86466
2024-09-19 18:59:09 +00:00
Rahul Joshi
91fd3e764b
[LLVM][TableGen] Speed up sorting of intrinsics ( #109230 )
...
Speed up sorting of intrinsics by using the TargetPrefix to only
discriminate beteween target dependent vs target independent intrinsics
where target independent ones need to be sorted before target dependent
ones. When comparing two target dependent intrinsics, the Name already
includes `llvm.<TargetPrefix>` as a prefix, so no need to needlessly
compare it separately.
2024-09-19 10:23:47 -07:00
Jay Foad
e03f427196
[LLVM] Use {} instead of std::nullopt to initialize empty ArrayRef ( #109133 )
...
It is almost always simpler to use {} instead of std::nullopt to
initialize an empty ArrayRef. This patch changes all occurrences I could
find in LLVM itself. In future the ArrayRef(std::nullopt_t) constructor
could be deprecated or removed.
2024-09-19 16:16:38 +01:00
LLVM GN Syncbot
4d459dfa41
[gn build] Port ed8f78827895
2024-09-19 13:36:13 +00:00
LLVM GN Syncbot
887224d177
[gn build] Port 0ee10e946660
2024-09-19 13:36:12 +00:00
Nico Weber
aa5eff9ee3
[gn] port ed8f78827895 (rm clang-pseudo)
2024-09-19 09:26:58 -04:00
Eisuke Kawashima
a6ab19b1d4
fix(llvm/**.py): fix comparison to True/False ( #94040 )
...
from PEP8
(https://peps.python.org/pep-0008/#programming-recommendations ):
> Comparisons to singletons like None should always be done with is or
is not, never the equality operators.
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-09-19 14:38:15 +02:00
Rahul Joshi
e0458a24a1
[LLVM][TableGen] Add error check for duplicate intrinsic names ( #109226 )
...
Check for duplicate intrinsic names in the intrinsic emitter backend and
issue a fatal error if we find one.
2024-09-19 05:21:00 -07:00
Rahul Joshi
bc3dfe7bdd
[LLVM][TableGen] Change PrintEnums to use const RecordKeeper ( #109200 )
...
Change PrintEnums to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-19 05:16:28 -07:00
Rahul Joshi
3e24dd42dd
[NFC] Rename variables to conform to LLVM coding standards ( #109166 )
...
Rename `indent` to `Indent` and `o` to `OS`.
Rename `Indentation` to `Indent`.
Remove unused argument from `emitPredicateMatch`.
Change `Indent` argument to `emitBinaryParser` to by value.
2024-09-19 04:49:12 -07:00
Nico Weber
61ed5387c8
[gn] port c18be32185ca
2024-09-19 07:34:17 -04:00
Rahul Joshi
23123aa4ec
[LLVM][TableGen] Change InstrInfoEmitter to use const RecordKeeper ( #109189 )
...
Change InstrInfoEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 22:27:26 -07:00
Rahul Joshi
7603e85429
[LLVM][TableGen] Change PseudoLoweringEmitter to use const RecordKeeper ( #109194 )
...
Change PseudoLoweringEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 22:26:48 -07:00
Rahul Joshi
0f06f707ec
[NFC] Cleanup RegisterInfoEmitter code ( #109199 )
...
Change variable name `o` to `OS` to match definition, and
`ClName` to `ClassName` for better clarity.
Cache RegBank reference in the class and do no pass around
class members to functions.
2024-09-18 21:42:52 -07:00
Rahul Joshi
56015da593
[LLVM][TableGen] Change RegisterBankEmitter to use const RecordKeeper ( #109195 )
...
Change RegisterBankEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 20:45:26 -07:00
Rahul Joshi
9ddb1cd564
[LLVM][TableGen] Change DFAPacketizerEmitter to use const RecordKeeper ( #109044 )
...
Change DFAPacketizerEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 13:07:09 -07:00
Rahul Joshi
9284e1870d
[LLVM][TableGen] Change DAGISel code to use const RecordKeeper ( #109038 )
...
Change DAGISel code to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 13:06:41 -07:00
LLVM GN Syncbot
51df8a3327
[gn build] Port 71e434d30280
2024-09-18 18:36:55 +00:00
Rahul Joshi
2c966709b7
[LLVM][TableGen] Change CompressInstEmitter to use const RecordKeeper ( #109035 )
...
Change CompressInstEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 10:42:51 -07:00
Rahul Joshi
80aa4dab1e
[LLVM][TableGen] Change X86FoldTablesEmitter to use const RecordKeeper ( #109070 )
...
Change X86FoldTablesEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 10:41:57 -07:00
Rahul Joshi
1a793a8ca0
[LLVM][TableGen] Change X86InstrMapping to use const RecordKeeper ( #109066 )
...
Change X86InstrMappingEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 10:41:21 -07:00
Rahul Joshi
b18190ebfc
[LLVM][TableGen] Change MacroFusionPredicator to use const RecordKeeper ( #109064 )
...
Change MacroFusionPredicator to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:59:24 -07:00
Rahul Joshi
47d76a9910
[LLVM][TableGen] Change InstrDocsEmitter to use const RecordKeeper ( #109061 )
...
Change InstrDocsEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:58:36 -07:00
Rahul Joshi
ab2b333f0d
[LLVM][TableGen] Change FastISelEmitter to use const RecordKeeper ( #109060 )
...
Change FastISelEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:58:04 -07:00
Rahul Joshi
74335fb7ae
[LLVM][TableGen] Change X86MnemonicTables to use const RecordKeeper ( #109053 )
...
Change X86MnemonicTables to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:57:31 -07:00
Rahul Joshi
4fbac52841
[LLVM][TableGen] Change DXILEmitter to use const RecordKeeper ( #109045 )
...
Change DXILEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:56:56 -07:00
Craig Topper
06048aaa73
[Target] Use 'unsigned' as the underlying type for the tablegened physical register enums. ( #109086 )
...
Otherwise, the enum defaults to 'int'. Update a few places that used
'int' for registers that now need to change to avoid a signed/unsigned
compare warning.
I was hoping this would allow us to remove the 'int' comparison
operators in Register.h and MCRegister.h, but compares with literal 0
still need them.
2024-09-18 09:54:21 -07:00
Rahul Joshi
0545e9f5b6
[LLVM][TableGen] Change DFAEmitter to use const Record pointers ( #109042 )
...
Change DFAEmitter to use const Record pointers.
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-18 09:52:50 -07:00