History log of /llvm-project/llvm/utils/TableGen/Common/CodeGenTarget.cpp (Results 1 – 16 of 16)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6
# 73eecb70 16-Dec-2024 Sergei Barannikov <barannikov88@gmail.com>

[TableGen][GISel] Don't use std::optional with pointers (NFC) (#120026)

Pointers already have a well-defined null value.


# 6b223260 11-Dec-2024 Sergei Barannikov <barannikov88@gmail.com>

[TableGen] Replace WantRoot/WantParent SDNode properties with flags (#119599)

These properties are only valid on ComplexPatterns. Having them as flags
is more convenient because one can now use "let

[TableGen] Replace WantRoot/WantParent SDNode properties with flags (#119599)

These properties are only valid on ComplexPatterns. Having them as flags
is more convenient because one can now use "let = ... in" syntax to set
these flags on several patterns at a time. This is also less error-prone
as it makes it impossible to specify these properties on records derived
from SDPatternOperator.

Pull Request: https://github.com/llvm/llvm-project/pull/119599

show more ...


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4
# ef455e6b 30-Oct-2024 Jessica Clarke <jrtc27@jrtc27.com>

[TableGen] Replace all lingering uses of getName with getEnumName

The former is a wrapper for the latter with two differences: Other is
mapped to "UNKNOWN" (rather than "MVT::Other"), and iPTR(Any)

[TableGen] Replace all lingering uses of getName with getEnumName

The former is a wrapper for the latter with two differences: Other is
mapped to "UNKNOWN" (rather than "MVT::Other"), and iPTR(Any) are mapped
to "TLI.getPointerTy()" rather than "MVT::iPTR(Any)".

The only uses are in FastISelMap::printFunctionDefinitions. Most of
these uses are just a form of name mangling to ensure uniqueness, so the
actual string isn't important (and, in the case of MVT::iPTR(Any), were
both to be used, they would clash). Two uses are for a case statement,
which requires the expression to be a constant (of the right type), but
neither UNKNOWN nor TLI.getPointerTy() are constants, so would not work
there. The remaining uses are where an expression is needed, so UNKNOWN
similarly doesn't work, though TLI.getPointerTy() could in this case.
However, neither iPTR nor iPTRAny are supposed to make it this far
through TableGen, and should instead have been replaced with concrete
types, so this case should not be hit. Moreover, for almost all of these
uses, the name is passed to getLegalCName, which will strip an MVT::
prefix but will leave TLI.getPointerTy() unchanged, which is not a valid
C identifier, nor component thereof.

Thus, delete this unnecessary, and mostly-broken, wrapper and just use
the underlying getEnumName. This has been verified to have no effect on
the generated files for any in-tree target, including experimental ones.

Reviewers: arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/113731

show more ...


Revision tags: 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
# a140931b 01-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Change `getValueAsListOfDefs` to return const pointer vector (#110713)

Change `getValueAsListOfDefs` to return a vector of const Record
pointer, and remove `getValueAsListOfConstDefs` th

[TableGen] Change `getValueAsListOfDefs` to return const pointer vector (#110713)

Change `getValueAsListOfDefs` to return a vector of const Record
pointer, and remove `getValueAsListOfConstDefs` that was added as a
transition aid.

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
# 3138eb50 23-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[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 Tabl

[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

show more ...


# 23123aa4 19-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[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 TableG

[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

show more ...


Revision tags: llvmorg-19.1.0
# 87e8b530 15-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[LLVM][TableGen] Change CodeGenDAGPatterns to use const RecordKeeper (#108762)

Change CodeGenDAGPatterns to use const RecordKeeper.

This is a part of effort to have better const correctness in Ta

[LLVM][TableGen] Change CodeGenDAGPatterns to use const RecordKeeper (#108762)

Change CodeGenDAGPatterns 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 ...


# 43f044ba 15-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[LLVM][TableGen] Change CodeGenTarget to use const RecordKeeper (#108752)

Change CodeGenTarget to use const RecordKeeper.

This is a part of effort to have better const correctness in TableGen
ba

[LLVM][TableGen] Change CodeGenTarget to use const RecordKeeper (#108752)

Change CodeGenTarget 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 ...


# 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 ...


# c1e3b990 07-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Eliminate static CodeGenIntrinsicMap in PatternParser (#107339)

Instead, move it to CodeGenTarget class, and use it in both
PatternParser and SearchableTableEmitter.


Revision tags: llvmorg-19.1.0-rc4
# dc03ee3c 31-Aug-2024 Brandon Wu <brandon.wu@sifive.com>

[llvm][RISCV] Add RISCV vector tuple type to value types(MVT) (#97993)

Summary:
This patch handles the types(MVT) in `selectionDAG` for RISCV vector
tuples.
As described in previous patch handlin

[llvm][RISCV] Add RISCV vector tuple type to value types(MVT) (#97993)

Summary:
This patch handles the types(MVT) in `selectionDAG` for RISCV vector
tuples.
As described in previous patch handling llvm types, the MVTs also have
32 variants:
```
riscv_nxv1i8x2, riscv_nxv1i8x3, riscv_nxv1i8x4, riscv_nxv1i8x5, riscv_nxv1i8x6, riscv_nxv1i8x7, riscv_nxv1i8x8,
riscv_nxv2i8x2, riscv_nxv2i8x3, riscv_nxv2i8x4, riscv_nxv2i8x5, riscv_nxv2i8x6, riscv_nxv2i8x7, riscv_nxv2i8x8,
riscv_nxv4i8x2, riscv_nxv4i8x3, riscv_nxv4i8x4, riscv_nxv4i8x5, riscv_nxv4i8x6, riscv_nxv4i8x7, riscv_nxv4i8x8,
riscv_nxv8i8x2, riscv_nxv8i8x3, riscv_nxv8i8x4, riscv_nxv8i8x5, riscv_nxv8i8x6, riscv_nxv8i8x7, riscv_nxv8i8x8,
riscv_nxv16i8x2, riscv_nxv16i8x3, riscv_nxv16i8x4,
riscv_nxv32i8x2.
```

Detail:
An intuitive way to model vector tuple type is using nested scalable
vector, e.g. `nElts=NF, EltTy=nxv2i32`. However it's not compatible to
what we've done to handle scalable vector in TargetLowering, so it would
need more effort to change the code to handle this concept.
Another approach is encoding the `MinNumElts` info in `sz` of `MVT`,
e.g.
`nElts=NF, sz=(NF*MinNumElts*8)`, this makes it much easier to handle
and
changes less code.

This patch adopts the latter approach.

Stacked on https://github.com/llvm/llvm-project/pull/97992

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8
# abedb3b8 12-Jun-2024 Jay Foad <jay.foad@amd.com>

[CodeGenTypes] Speed up getVectorElementType and getVectorMinNumElements (#95282)

Implement MVT::getVectorElementType and MVT::getVectorMinNumElements
with table lookup instead of switch.

This s

[CodeGenTypes] Speed up getVectorElementType and getVectorMinNumElements (#95282)

Implement MVT::getVectorElementType and MVT::getVectorMinNumElements
with table lookup instead of switch.

This speeds up "check-llvm-codegen-amdgpu" by about 7% in my Release
build.

show more ...


Revision tags: llvmorg-18.1.7
# d9293519 02-Jun-2024 Kazu Hirata <kazu@google.com>

[TableGen] Use llvm::unique (NFC) (#94163)


# 85cf2e5e 25-May-2024 Brandon Wu <brandon.wu@sifive.com>

[llvm] Include the GenVT.inc to getEnumName (#93198)

This reduces the effort of adding MVT strings every time.


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# 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 ...