Revision tags: llvmorg-21-init |
|
#
aca08a85 |
| 27-Jan-2025 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Add assert to validate `Objects` list for `HwModeSelect` (#123794)
- Bail out of TableGen if any asserts fail before running the backend.
- Add asserts to validate that the `Objects` an
[TableGen] Add assert to validate `Objects` list for `HwModeSelect` (#123794)
- Bail out of TableGen if any asserts fail before running the backend.
- Add asserts to validate that the `Objects` and `Modes` lists for
various `HwModeSelect` subclasses are of same length.
- Eliminate equivalent check in CodeGenHWModes.cpp
show more ...
|
#
4e8c9d28 |
| 16-Jan-2025 |
Jay Foad <jay.foad@amd.com> |
[TableGen] Use std::pair instead of std::make_pair. NFC. (#123174)
Also use brace initialization and emplace to avoid explicitly
constructing std::pair, and the same for std::tuple.
|
Revision tags: llvmorg-19.1.7 |
|
#
97ea0aba |
| 06-Jan-2025 |
Markus Böck <markus.boeck02@gmail.com> |
[TableGen] Do not exit in template argument check (#121636)
The signature of `CheckTemplateArgValues` implements error handling via the `bool` return type, yet always returned false. The single poss
[TableGen] Do not exit in template argument check (#121636)
The signature of `CheckTemplateArgValues` implements error handling via the `bool` return type, yet always returned false. The single possible error case instead used `PrintFatalError,` which exits the program afterward.
This behavior is undesirable: It prevents any further errors from being printed and makes TableGen less usable as a library as it crashes the entire process (e.g. `tblgen-lsp-server`).
This PR therefore fixes the issue by using `Error` instead and returning true if an error occurred. All callers already perform proper error handling.
As `llvm-tblgen` exits on error, a test was also added to the LSP to ensure it exits normally despite the error.
show more ...
|
#
b24caf3d |
| 18-Dec-2024 |
Krzysztof Drewniak <Krzysztof.Drewniak@amd.com> |
[llvm][TableGen] Add a !initialized predicate to allow testing for ? (#117964)
There are cases (like in an upcoming patch to MLIR's `Property` class)
where the ? value is a useful null value. Howev
[llvm][TableGen] Add a !initialized predicate to allow testing for ? (#117964)
There are cases (like in an upcoming patch to MLIR's `Property` class)
where the ? value is a useful null value. However, existing predicates
make ti difficult to test if the value in a record one is operating is ?
or not.
This commit adds the !initialized predicate, which is 1 on concrete,
non-? values and 0 on ?.
---------
Co-authored-by: Akshat Oke <Akshat.Oke@amd.com>
show more ...
|
Revision tags: llvmorg-19.1.6 |
|
#
1db2d571 |
| 09-Dec-2024 |
David Spickett <david.spickett@linaro.org> |
[llvm][TableGen] Fix misleading error for invalid use of let (#118616)
Fixes #118490
Point to the value name, otherwise it implies that the part after the
'=' is the problem.
Before:
```
/t
[llvm][TableGen] Fix misleading error for invalid use of let (#118616)
Fixes #118490
Point to the value name, otherwise it implies that the part after the
'=' is the problem.
Before:
```
/tmp/test.td:2:27: error: Value 'FlattenedFeatures' unknown!
let FlattenedFeatures = [];
^
```
After:
```
/tmp/test.td:2:7: error: Value 'FlattenedFeatures' unknown!
let FlattenedFeatures = [];
^
```
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
743f839a |
| 23-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[NFC][LLVM][TableGen] Change `RecordKeeper::getClass` to return const pointer (#112261)
Change `RecordKeeper::getClass` to return const record pointer. This is
a part of effort to have better const
[NFC][LLVM][TableGen] Change `RecordKeeper::getClass` to return const pointer (#112261)
Change `RecordKeeper::getClass` to return const record pointer. 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
show more ...
|
#
f58ce115 |
| 21-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[NFC][TableGen] Use auto when initializing variables with cast<> (#113171)
Use `auto` when initializing a variable with `cast<>`. Remove some
unneeded `const_cast` (since all Init pointers are now
[NFC][TableGen] Use auto when initializing variables with cast<> (#113171)
Use `auto` when initializing a variable with `cast<>`. Remove some
unneeded `const_cast` (since all Init pointers are now const).
show more ...
|
#
62e2c7fb |
| 18-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[LLVM][TableGen] Change all `Init` pointers to const (#112705)
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-
[LLVM][TableGen] Change all `Init` pointers to const (#112705)
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
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
667815cc |
| 03-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[NFC][TableGen] Change `RecordKeeper::getDef()` to return const pointer (#110992)
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/p
[NFC][TableGen] Change `RecordKeeper::getDef()` to return const pointer (#110992)
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
show more ...
|
#
241f9365 |
| 03-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Fix source location for anonymous records (#110935)
Fix source location for anonymous records to be the one of the locations
where that record is instantiated as opposed to the location
[TableGen] Fix source location for anonymous records (#110935)
Fix source location for anonymous records to be the one of the locations
where that record is instantiated as opposed to the location of the
class that was anonymously instantiated.
Currently, when a record is anonymously instantiated (via
`VarDefInit::instantiate`), we use the location of the class for the
record, which is not correct. Instead, pass in the `SMLoc` for the
location where the anonymous instantiation happens and use that location
when the record is instantiated. If there are multiple anonymous
instantiations with the same parameters, the location for the (single)
record created will be one of these instantiation locations as opposed
to the class location.
show more ...
|
#
65e69f74 |
| 02-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (#110845)
Change `Record::getSuperClasses` to return a const pointer to the
superclass records.
This is a part of effort to
[NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (#110845)
Change `Record::getSuperClasses` to return a const pointer to the
superclass records.
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
show more ...
|
#
d256b9e8 |
| 02-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Change `DefInit::Def` to a const Record pointer (#110747)
This change undoes a const_cast<> introduced in an earlier change to
help transition to const pointers. It is a part of effort t
[TableGen] Change `DefInit::Def` to a const Record pointer (#110747)
This change undoes a const_cast<> introduced in an earlier change to
help transition to const pointers. It 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
show more ...
|
#
9d95e261 |
| 01-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Change all type pointers to const (#110602)
This is a part of effort to have better const correctness in TableGen
backends:
https://discourse.llvm.org/t/psa-planned-changes-to-table
[TableGen] Change all type pointers to const (#110602)
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
show more ...
|
Revision tags: llvmorg-19.1.1 |
|
#
ec61311e |
| 01-Oct-2024 |
Stephen Chou <stephenchouca@users.noreply.github.com> |
[LLVM][TableGen] Support type casts of nodes with multiple results (#109728)
Currently, type casts can only be used to pattern match for intrinsics
with a single overloaded return value. For instan
[LLVM][TableGen] Support type casts of nodes with multiple results (#109728)
Currently, type casts can only be used to pattern match for intrinsics
with a single overloaded return value. For instance:
```
def int_foo : Intrinsic<[llvm_anyint_ty], []>;
def : Pat<(i32 (int_foo)), ...>;
```
This patch extends type casts to support matching intrinsics with
multiple overloaded return values. As an example, the following defines
a pattern that matches only if the overloaded intrinsic call returns an
`i16` for the first result and an `i32` for the second result:
```
def int_bar : Intrinsic<[llvm_anyint_ty, llvm_anyint_ty], []>;
def : Pat<([i16, i32] (int_bar)), ...>;
```
show more ...
|
#
7ac474ba |
| 30-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (#110032)
Change SeachableTableEmitter to use const RecordKeeper.
Also change RecordRecTy to use const Record pointers for it
[LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (#110032)
Change SeachableTableEmitter to use const RecordKeeper.
Also change RecordRecTy to use const Record pointers for its classes.
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
show more ...
|
#
66c8dce8 |
| 24-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Add a !listflatten operator to TableGen (#109346)
Add a !listflatten operator that will transform an input list of type
`list<list<X>>` to `list<X>` by concatenating elements of the
con
[TableGen] Add a !listflatten operator to TableGen (#109346)
Add a !listflatten operator that will transform an input list of type
`list<list<X>>` to `list<X>` by concatenating elements of the
constituent lists of the input argument.
show more ...
|
#
e03f4271 |
| 19-Sep-2024 |
Jay Foad <jay.foad@amd.com> |
[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 oc
[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.
show more ...
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
576aa3a5 |
| 19-Aug-2024 |
Akshat Oke <76596238+Akshat-Oke@users.noreply.github.com> |
[TableGen] Resolve References at top level (#104578)
Add a dummy resolver to resolve references outside records. This invokes
Fold() with isFinal to force resolution.
Fixes #102447
Co-authore
[TableGen] Resolve References at top level (#104578)
Add a dummy resolver to resolve references outside records. This invokes
Fold() with isFinal to force resolution.
Fixes #102447
Co-authored-by: Akshat Oke <Akshat.Oke@amd.com>
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
837dc3b1 |
| 08-Jul-2024 |
Kazu Hirata <kazu@google.com> |
[TableGen] Use range-based for loops (NFC) (#97678)
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2 |
|
#
acf6811d |
| 02-Feb-2024 |
Wang Pengcheng <wangpengcheng.pp@bytedance.com> |
[TableGen] Support type aliases via new keyword deftype
We can use `deftype` (not using `typedef` here to be consistent with `def`, `defm`, `defset`, `defvar`, etc) to define type aliases.
Currentl
[TableGen] Support type aliases via new keyword deftype
We can use `deftype` (not using `typedef` here to be consistent with `def`, `defm`, `defset`, `defvar`, etc) to define type aliases.
Currently, only primitive types and type aliases are supported to be the source type and `deftype` statements can only appear at the top level.
Reviewers: fpetrogalli, Artem-B, nhaehnle, jroelofs
Reviewed By: jroelofs, nhaehnle, Artem-B
Pull Request: https://github.com/llvm/llvm-project/pull/79570
show more ...
|
Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
0d55ea25 |
| 11-Nov-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Stop including llvm/ADT/DenseMapInfo.h (NFC)
Identified with clangd.
|
Revision tags: llvmorg-17.0.4 |
|
#
f9306f6d |
| 25-Oct-2023 |
Kazu Hirata <kazu@google.com> |
[ADT] Rename llvm::erase_value to llvm::erase (NFC) (#70156)
C++20 comes with std::erase to erase a value from std::vector. This
patch renames llvm::erase_value to llvm::erase for consistency with
[ADT] Rename llvm::erase_value to llvm::erase (NFC) (#70156)
C++20 comes with std::erase to erase a value from std::vector. This
patch renames llvm::erase_value to llvm::erase for consistency with
C++20.
We could make llvm::erase more similar to std::erase by having it
return the number of elements removed, but I'm not doing that for now
because nobody seems to care about that in our code base.
Since there are only 50 occurrences of erase_value in our code base,
this patch replaces all of them with llvm::erase and deprecates
llvm::erase_value.
show more ...
|
#
d1d3aa34 |
| 24-Oct-2023 |
Wang Pengcheng <wangpengcheng.pp@bytedance.com> |
[TableGen][NFC] Add record kind to `Record` class (#69919)
enum `RecordKind` is added to indicate the kind of Record (which
can be a normal record definition, anonymous record definition,
class or
[TableGen][NFC] Add record kind to `Record` class (#69919)
enum `RecordKind` is added to indicate the kind of Record (which
can be a normal record definition, anonymous record definition,
class or multiclass).
Some arguments like `IsMC` and `IsDefm` are removed since we can
get the information from `RecordKind`.
show more ...
|
#
1e439756 |
| 23-Oct-2023 |
Wang Pengcheng <137158460+wangpc-pp@users.noreply.github.com> |
[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 implementatio
[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.
show more ...
|
#
db9b6f49 |
| 19-Oct-2023 |
Francesco Petrogalli <francesco.petrogalli@apple.com> |
[Tablegen] Add keyword `dump`. (#68793)
The keyword is intended for debugging purpose. It prints a message to
stderr.
This patch is based on code originally written by Adam Nemet, and on the
fe
[Tablegen] Add keyword `dump`. (#68793)
The keyword is intended for debugging purpose. It prints a message to
stderr.
This patch is based on code originally written by Adam Nemet, and on the
feedback received by the reviewers in
https://reviews.llvm.org/D157492.
show more ...
|