Revision tags: llvmorg-21-init |
|
#
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.
|
#
943b212d |
| 15-Jan-2025 |
abhishek-kaushik22 <abhishek.kaushik@intel.com> |
[TableGen] Use `std::move` to avoid copy (#123088)
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
31ce47b5 |
| 21-Nov-2024 |
abhishek-kaushik22 <abhishek.kaushik@intel.com> |
[TableGen] Use `std::move` to avoid copy (#113061)
|
Revision tags: llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
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, llvmorg-19.1.1 |
|
#
708567ab |
| 20-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[LLVM][TableGen] Adopt `indent` for indentation (#109275)
Adopt `indent` for indentation DAGISelMatcher and DecoderEmitter.
|
#
b594b930 |
| 20-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[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
[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
show more ...
|
#
3e24dd42 |
| 19-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[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`
[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.
show more ...
|
#
2bb3621f |
| 18-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[LLVM][TableGen] Change DecoderEmitter to use const RecordKeeper (#109040)
Change DecoderEmitter to use const RecordKeeper.
This is a part of effort to have better const correctness in TableGen
[LLVM][TableGen] Change DecoderEmitter to use const RecordKeeper (#109040)
Change DecoderEmitter 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
show more ...
|
Revision tags: llvmorg-19.1.0 |
|
#
bdf02249 |
| 09-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Change CGIOperandList::OperandInfo::Rec to const pointer (#107858)
Change CGIOperandList::OperandInfo::Rec and CGIOperandList::TheDef to
const pointer.
This is a part of effort to hav
[TableGen] Change CGIOperandList::OperandInfo::Rec to const pointer (#107858)
Change CGIOperandList::OperandInfo::Rec and CGIOperandList::TheDef to
const 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 ...
|
#
0ceffd36 |
| 07-Sep-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[TableGen] Add PrintError family overload that take a print function (#107333)
Add PrintError and family overload that accepts a print function. This
avoids constructing potentially long strings fo
[TableGen] Add PrintError family overload that take a print function (#107333)
Add PrintError and family overload that accepts a print function. This
avoids constructing potentially long strings for passing into these
print functions.
show more ...
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
a46d60ad |
| 15-Jul-2024 |
Max Beck-Jones <max.beck-jones@arm.com> |
[NFC] [AArch64] Refactor predicate register class decode functions (#97412)
In a previous PR #81716, a new decoder function was added to
llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
[NFC] [AArch64] Refactor predicate register class decode functions (#97412)
In a previous PR #81716, a new decoder function was added to
llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp. During
code review it was suggested that, as most of the decoder functions were
very similar in structure, that they be refactored into a single,
templated function. I have added the refactored function, removed the
definitions of the replaced functions, and replaced the references to
the replaced functions in AArch64Disassembler.cpp and
llvm/lib/Target/AArch64/AArch64RegisterInfo.td. To reduce the number of
duplicate references in AArch64RegisterInfo.td, I have also made a small
change to llvm/utils/TableGen/DecoderEmitter.cpp.
show more ...
|
#
35bb9f15 |
| 14-Jul-2024 |
Piotr Fusik <piotr@fusion-lang.org> |
[TableGen][NFC] Use `decodeULEB128AndIncUnsafe` in `decodeInstruction` (#98619)
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
efad1495 |
| 08-May-2024 |
Fangrui Song <i@maskray.me> |
[Support] Add end/error to decode[US]LEB128AndInc
Follow-up to #85739 to encourage error checking. We make `end` mandatory and add decodeULEB128AndIncUnsafe to be used without `end`.
Pull Request:
[Support] Add end/error to decode[US]LEB128AndInc
Follow-up to #85739 to encourage error checking. We make `end` mandatory and add decodeULEB128AndIncUnsafe to be used without `end`.
Pull Request: https://github.com/llvm/llvm-project/pull/90006
show more ...
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3 |
|
#
da1d3d8f |
| 01-Apr-2024 |
superZWT123 <zhengwentao3@huawei.com> |
[TableGen] Introduce a less aggressive suppression for HwMode Decoder… (#86060)
1. Remove 'AllModes' and 'DefaultMode' suffixes for DecoderTables under
default HwMode.
2. Introduce a less aggressi
[TableGen] Introduce a less aggressive suppression for HwMode Decoder… (#86060)
1. Remove 'AllModes' and 'DefaultMode' suffixes for DecoderTables under
default HwMode.
2. Introduce a less aggressive suppression for HwMode DecoderTable, only
reduce necessary tables duplications. This allows encodings under
different HwModes to retain the original DecoderNamespace.
3. Change 'suppress-per-hwmode-duplicates' command option from bool type
to enum type, allowing users to choose what level of suppression to use.
show more ...
|
#
fa3d789d |
| 25-Mar-2024 |
Pierre van Houtryve <pierre.vanhoutryve@amd.com> |
[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 "Comm
[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
show more ...
|
#
35bf8e79 |
| 19-Mar-2024 |
Fangrui Song <i@maskray.me> |
[Support] Add decodeULEB128AndInc/decodeSLEB128AndInc
Many decodeULEB128/decodeSLEB128 users need to increment the pointer. Add helpers to simplify this common pattern. We don't add `end` and `error
[Support] Add decodeULEB128AndInc/decodeSLEB128AndInc
Many decodeULEB128/decodeSLEB128 users need to increment the pointer. Add helpers to simplify this common pattern. We don't add `end` and `error` parameters at present because many users don't need them.
Pull Request: https://github.com/llvm/llvm-project/pull/85739
show more ...
|
Revision tags: llvmorg-18.1.2 |
|
#
390f2870 |
| 13-Mar-2024 |
mahesh-attarde <145317060+mahesh-attarde@users.noreply.github.com> |
[CodeGen][Tablegen] Fix uninitialized var and shift overflow. (#84896)
Fix uninitialized var and shift overflow.
|
#
e9492cca |
| 12-Mar-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] DecoderEmitter clean-ups and modernization. (#84832)
The decoder emitter is showing some signs of age. This patch makes a few
kinds of clean-ups:
- Use ranged-for more widely, including
[TableGen] DecoderEmitter clean-ups and modernization. (#84832)
The decoder emitter is showing some signs of age. This patch makes a few
kinds of clean-ups:
- Use ranged-for more widely, including using enumerate() for those
loops maintaining a loop index along with the items.
- Reduce the number of arguments to fieldFromInsn (removes an out
reference parameter: CodingStandards). The insn_t argument to insnWithID
can/should probably be removed soon too since modern C++ allows us to
return a local container without a copy.
- Use raw strings for the large emitted code segments. This enhances
both readability and modifiability.
show more ...
|
#
6f7e940c |
| 11-Mar-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] More efficiency improvements for encode/decode emission. (#84647)
DecoderEmitter and CodeEmitterGen perform repeated linear walks over the
entire instruction list. This patch eliminates
[TableGen] More efficiency improvements for encode/decode emission. (#84647)
DecoderEmitter and CodeEmitterGen perform repeated linear walks over the
entire instruction list. This patch eliminates two more such walks.
The eliminated traversals visit every instruction merely to determine
whether the target has variable length encodings. For a target with
variable length encodings, the original any_of will terminate quickly.
But all targets other than M68k use fixed length encodings and thus
any_of must visit the entire instruction list.
show more ...
|
Revision tags: llvmorg-18.1.1 |
|
#
ad43ea33 |
| 28-Feb-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] Add support for DefaultMode in per-HwMode encode/decode. (#83029)
Currently the decoder and encoder emitters will crash if DefaultMode is
used within an EncodingByHwMode. As can be done
[TableGen] Add support for DefaultMode in per-HwMode encode/decode. (#83029)
Currently the decoder and encoder emitters will crash if DefaultMode is
used within an EncodingByHwMode. As can be done today for
RegInfoByHwMode and ValueTypeByHwMode, this patch adds support for this
usage in EncodingByHwMode:
let EncodingInfos =
EncodingByHwMode<[ModeA, DefaultMode], [EncA, EncDefault]>;
show more ...
|
Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4 |
|
#
f75c6ed9 |
| 26-Feb-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] Efficiency improvements for encoding HwMode collection. (#82902)
Currently the DecoderEmitter spends a fair amount of cycles performing
repeated linear walks over the entire instruction
[TableGen] Efficiency improvements for encoding HwMode collection. (#82902)
Currently the DecoderEmitter spends a fair amount of cycles performing
repeated linear walks over the entire instruction list. This patch
eliminates one such walk during HwMode collection for EncodingInfos.
The eliminated traversal visits every instruction and then every
EncodingInfos entry for that instruction merely to collect all
referenced HwModes. That information already happens to be present in
the HwModeSelects created during the one-time construction of
CodeGenHwModes. We instead traverse the HwModeSelects, collecting each
one referenced as an encoding select. This set is a small constant in
size and does not generally grow with the size of the instruction set.
show more ...
|
#
05af9c83 |
| 22-Feb-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] Suppress per-HwMode duplicate instructions/tables. (#82567)
Currently, for per-HwMode encoding/decoding, those instructions that do
not have a HwMode override are duplicated into the dec
[TableGen] Suppress per-HwMode duplicate instructions/tables. (#82567)
Currently, for per-HwMode encoding/decoding, those instructions that do
not have a HwMode override are duplicated into the decoder tables for
all HwModes. This includes inducing multiple tables for instructions
that are otherwise unrelated (e.g., different namespace with no
overrides at all).
This patch adds support to suppress instruction and table duplicates.
TableGen option "-gen-disassembler --suppress-per-hwmode-duplicates"
enables the suppression (off by default).
For one downstream backend with a complicated ISA and major
cross-generation encoding differences, this eliminates ~32000 duplicate
table entries at the time of this patch.
There are legitimate reasons to suppress or not suppress duplicates. If
there are relatively few non-overridden related instructions, it can be
convenient to pull them into the per-mode tables (only need to decode
the per-mode tables, slightly simpler decode function in disassembler).
On the other hand, in some backends, the opposite is true or the size is
too large to tolerate any duplication in the first place. We let the
user decide which makes sense.
This is currently off by default, though there is no reason it couldn't
be enabled by default. Any existing backends downstream using the
per-HwMode feature will function as before. Turning on the feature
requires minor modifications to their disassembler due to more/less
tables and naming.
show more ...
|
Revision tags: llvmorg-18.1.0-rc3 |
|
#
2ed0aacf |
| 19-Feb-2024 |
Jason Eckhardt <jeckhardt@nvidia.com> |
[TableGen] Fixes for per-HwMode decoding problem (#82201)
Today, if any instruction uses EncodingInfos/EncodingByHwMode to
override the default encoding, the opcode field of the decoder table is
g
[TableGen] Fixes for per-HwMode decoding problem (#82201)
Today, if any instruction uses EncodingInfos/EncodingByHwMode to
override the default encoding, the opcode field of the decoder table is
generated incorrectly. This causes failed disassemblies and other
problems.
Specifically, the main correctness issue is that the EncodingID is
inadvertently stored in the table rather than the actual opcode. This is
caused by having set up the IndexOfInstruction map incorrectly during
the loop to populate NumberedEncodings-- which is then propagated around
when OpcMap is set up with a bad EncodingIDAndOpcode.
Instead, do away with IndexOfInstruction altogether and use opcode value
queried from CodeGenTarget::getInstrIntValue to set up OpcMap. This
itself exposed another problem where emitTable was using the decoded
opcode to index into NumberedEncodings. Instead pass in the
EncodingIDAndOpcode vector, and create the reverse mapping from Opcode
to EncodingID, which is then used to index NumberedEncodings.
This problem is not currently exposed upstream since no in-tree targets
yet use the per-HwMode feature. It does show up in at least two
downstream targets.
show more ...
|
#
f723260a |
| 14-Feb-2024 |
Jay Foad <jay.foad@amd.com> |
[TableGen] Stop using make_pair and make_tuple. NFC. (#81730)
These are unnecessary since C++17.
|
#
b9079baa |
| 09-Feb-2024 |
Pierre van Houtryve <pierre.vanhoutryve@amd.com> |
[NFC] clang-format utils/TableGen (#80973)
```
find llvm/utils/TableGen -iname "*.h" -o -iname "*.cpp" | xargs clang-format-16 -i
```
Split from #80847
|