Rahul Joshi
b7908e3841
[NFC][MC][CodeEmitterGen] Extract error reporting into a helper function ( #159778 )
...
Extract error reporting code emitted by CodeEmitterGen into
MCCodeEmitter static members functions.
Additionally, remove unused ErrorHandling.h header from several files.
2025-09-23 09:05:10 -07:00
Sergei Barannikov
6462223853
[TableGen] Make ParseOperandName method const (NFC)
...
Also change its name to start with a lowercase letter and update
the doxygen comment to conform to the coding standard.
2025-08-20 03:21:15 +03:00
Sergei Barannikov
2f9f92ad01
[TableGen] Use getValueAsOptionalDef to simplify code (NFC) ( #153170 )
2025-08-12 17:44:01 +03:00
Rahul Joshi
5f2e88a125
[NFC][TableGen] Rename CodeGenTarget instruction accessors ( #146767 )
...
Rename `getXYZInstructionsByEnumValue()` to just `getXYZInstructions`
and drop the `ByEnumValue` in the name.
2025-07-07 08:01:14 -07:00
Jay Foad
432c5f2c60
[TableGen] Use emplace instead of insert and similar. NFC. ( #143164 )
2025-06-07 09:32:36 +01:00
Rahul Joshi
29fd76777d
[NFC][TableGen] Create valid Dag in VarLenCodeEmitter ( #140283 )
...
- Set the Dag ArgNames correctly when normalizing the Dag for slice.
- Add unit test to exercise the "slice" hi/lo swap case.
2025-05-19 12:27:18 -07:00
Rahul Joshi
7674d6fa9e
[LLVM][TableGen] Simplify DagInit::get ( #140056 )
...
- Add `DagInit::get` overloads that do not need ValName to be specified.
- Fix some calls to either not create temporary arrays for DAG args or
use the std::pair<> overload.
2025-05-16 09:45:58 -07:00
Rahul Joshi
62e2c7fb2d
[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
2024-10-18 07:50:22 -07:00
Rahul Joshi
100b34bbc1
[LLVM][TableGen] Change VarLenCodeEmitterGen to use const RecordKeeper ( #108960 )
...
Change VarLenCodeEmitterGen 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-17 09:01:04 -07:00
Rahul Joshi
3786568196
[TableGen] Change CodeGenInstruction record members to const ( #107921 )
...
Change CodeGenInstruction::{TheDef, InfereredFrom} to const 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-11 08:52:26 -07:00
Rahul Joshi
985600dcd3
[TableGen] Migrate CodeGenHWModes to use const RecordKeeper ( #107851 )
...
Migrate CodeGenHWModes to use const RecordKeeper and 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-09 13:09:53 -07:00
Youngsuk Kim
caf26b9437
[llvm][utils] Avoid 'raw_string_ostream::str()' (NFC) ( #97160 )
...
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.
Work towards TODO comment to remove `raw_string_ostream::str()`.
2024-06-29 18:50:52 -04:00
Pierre van Houtryve
fa3d789df1
[RFC][TableGen] Restructure TableGen Source ( #80847 )
...
Refactor of the llvm-tblgen source into:
- a "Basic" library, which contains the bare minimum utilities to build
`llvm-min-tablegen`
- a "Common" library which contains all of the helpers for TableGen
backends. Such helpers can be shared by more than one backend, and even
unit tested (e.g. CodeExpander is, maybe we can add more over time)
Fixes #80647
2024-03-25 09:40:35 +01:00