History log of /llvm-project/llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp (Results 1 – 14 of 14)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6
# 0c6457b7 03-Dec-2024 Mason Remy <masonr@microsoft.com>

[LLVM][TableGen] Refine overloaded intrinsic suffix check (#117957)

Previously the check comments indicated that [pi][0-9]+ would match as a
type suffix, however the check itself was looking for [p

[LLVM][TableGen] Refine overloaded intrinsic suffix check (#117957)

Previously the check comments indicated that [pi][0-9]+ would match as a
type suffix, however the check itself was looking for [pi][0-9]* and
hence an 'i' suffix in isolation was being considered as a type suffix
despite it not having a bitwidth.

This change makes the check consistent with the comment and looks for
[pi][0-9]+

show more ...


Revision tags: llvmorg-19.1.5, 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 ...


# 2a0073f6 15-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[LLVM][TableGen] Check overloaded intrinsic mangling suffix conflicts (#110324)

Check name conflicts between intrinsics caused by mangling suffix.

If the base name of an overloaded intrinsic is a

[LLVM][TableGen] Check overloaded intrinsic mangling suffix conflicts (#110324)

Check name conflicts between intrinsics caused by mangling suffix.

If the base name of an overloaded intrinsic is a proper prefix of
another intrinsic, check if the other intrinsic name suffix after the
proper prefix can match a mangled type and issue an error if it can.

show more ...


Revision tags: llvmorg-19.1.2
# 91fdfec2 05-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC][TableGen] Change `CodeGenIntrinsics` to use const references (#111219)

Change `CodeGenIntrinsics` classes to vend out const references to
`CodeGenIntrinsic` or `TargetSet` objects.


Revision tags: llvmorg-19.1.1
# 2f43e659 25-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[LLVM][TableGen] Check name conflicts between target dep and independent intrinsics (#109826)

Validate that for target independent intrinsics the second dotted
component of their name (after the `

[LLVM][TableGen] Check name conflicts between target dep and independent intrinsics (#109826)

Validate that for target independent intrinsics the second dotted
component of their name (after the `llvm.`) does not match any existing
target names (for which atleast one intrinsic has been defined). Doing
so is invalid as LLVM will search for that intrinsic in that target's
intrinsic table and not find it, and conclude that its an unknown
intrinsic.

show more ...


# 91fd3e76 19-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

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

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

show more ...


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

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


Revision tags: llvmorg-19.1.0
# 16df489f 06-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Add const variants of accessors for backend (#106658)

Split RecordKeeper `getAllDerivedDefinitions` family of functions into
two variants:
(a) non-const ones that return vectors of `R

[TableGen] Add const variants of accessors for backend (#106658)

Split RecordKeeper `getAllDerivedDefinitions` family of functions into
two variants:
(a) non-const ones that return vectors of `Record *` and
(b) const ones, that return vector/ArrayRef of `const Record *`.

This will help gradual migration of TableGen backends to use
`const RecordKeeper` and by implication change code to work
with const pointers and better const correctness.

Existing backends are not yet compatible with the const family of
functions, so change them to use a non-constant `RecordKeeper`
reference, till they are migrated.

show more ...


# 50be455a 05-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Add check for number of intrinsic return values (#107326)

Fail if we see an intrinsic that returns more than the supported number
of return values.

Intrinsics can return only upto a c

[TableGen] Add check for number of intrinsic return values (#107326)

Fail if we see an intrinsic that returns more than the supported number
of return values.

Intrinsics can return only upto a certain nyumber of values, as defined
by the `IIT_RetNumbers` list in `Intrinsics.td`. Currently, if we define
an intrinsic that exceeds the limit, llvm-tblgen crashes. Instead, read
this limit and fail if it's exceeded with a proper error message.

show more ...


# 98c6bbfe 04-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Refactor Intrinsics record (#106986)

Eliminate unused `isTarget` field in Intrinsic record.

Eliminate `isOverloaded`, `Types` and `TypeSig` fields from the record,
as they are already

[TableGen] Refactor Intrinsics record (#106986)

Eliminate unused `isTarget` field in Intrinsic record.

Eliminate `isOverloaded`, `Types` and `TypeSig` fields from the record,
as they are already available through the `TypeInfo` field. Change
intrinsic emitter code to look for this info using fields of the
`TypeInfo` record attached to the `Intrinsic` record.

Fix several intrinsic related unit tests to source the `Intrinsic` class
def from Intrinsics.td as opposed to defining a skeleton in the test.

This eliminates some duplication of information in the Intrinsic class,
as well as reduces the memory allocated for record fields, resulting in
~2% reduction (though that's not the main goal).

show more ...


# 660cc986 04-Sep-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Add `CodeGenIntrinsicsMap` for on-demand intrinsic creation (#107100)

- Add class `CodeGenIntrinsicMap` for on-demand creation of
`CodeGenIntrinsic`.
- Add class `CodeGenIntrinsicCo

[TableGen] Add `CodeGenIntrinsicsMap` for on-demand intrinsic creation (#107100)

- Add class `CodeGenIntrinsicMap` for on-demand creation of
`CodeGenIntrinsic`.
- Add class `CodeGenIntrinsicContext` to capture global information
required to build `CodeGenIntrinsic` objects.
- Adopt GlobalISel PatternParser and SearchableTableEmitter to use it.

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# ddda37a6 16-Aug-2024 Rahul Joshi <rjoshi@nvidia.com>

[TableGen] Refactor Intrinsic handling in TableGen (#103980)

CodeGenIntrinsic changes:
- Use `const` Record pointers, and `StringRef` when possible.
- Default initialize several fields with th

[TableGen] Refactor Intrinsic handling in TableGen (#103980)

CodeGenIntrinsic changes:
- Use `const` Record pointers, and `StringRef` when possible.
- Default initialize several fields with their definition instead of in
the constructor.
- Simplify various string checks in the constructor using StringRef
starts_with()/ends_with() functions.
- Eliminate first argument to `setDefaultProperties` and use `TheDef`
class member instead.

IntrinsicEmitter changes:
- Emit `namespace llvm::Intrinsic` instead of nested namespaces.
- End generated comments with a .
- Use range based for loops, and early continue within loops.
- Emit `static constexpr` instead of `static const` for arrays.
- Change `compareFnAttributes` to use std::tie() to compare intrinsic
attributes and return a default value when all attributes are equal.

STLExtras:
- Add std::replace wrapper which takes a range.

show more ...


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 72c901f5 03-Jun-2024 Simon Pilgrim <llvm-dev@redking.me.uk>

[TableGen] CodeGenIntrinsic - pass DefaultProperties as ArrayRef instead of std::vector by value.

Avoid std::vector copies as setDefaultProperties just iterates across the Records

Fixes #89207


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