History log of /llvm-project/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp (Results 1 – 25 of 46)
Revision Date Author Comments
# e8137503 03-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC] Rename variable `recordKeeper` to `records` (#110989)


# bccd37f6 02-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC][MLIR][TableGen] Eliminate `llvm::` for commonly used types (#110841)

Eliminate `llvm::` namespace qualifier for commonly used types in MLIR
TableGen backends to reduce code clutter.


# b75fe11f 29-Aug-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC] Fix formatv() usage in preparation of validation (#106454)

Fix several uses of formatv() that would be flagged as invalid by an
upcoming change that will add additional validation to formatv(

[NFC] Fix formatv() usage in preparation of validation (#106454)

Fix several uses of formatv() that would be flagged as invalid by an
upcoming change that will add additional validation to formatv().

show more ...


# db791b27 02-Jul-2024 Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com>

mlir/LogicalResult: move into llvm (#97309)

This patch is part of a project to move the Presburger library into
LLVM.


# 77cbc9bf 26-Mar-2024 Victor Perez <victor.perez@codeplay.com>

[MLIR][LLVM] Add `llvm.experimental.constrained.fptrunc` operation (#86260)

Add operation mapping to the LLVM
`llvm.experimental.constrained.fptrunc.*` intrinsic.

The new operation implements th

[MLIR][LLVM] Add `llvm.experimental.constrained.fptrunc` operation (#86260)

Add operation mapping to the LLVM
`llvm.experimental.constrained.fptrunc.*` intrinsic.

The new operation implements the new
`LLVM::FPExceptionBehaviorOpInterface` and
`LLVM::RoundingModeOpInterface` interfaces.

---------

Signed-off-by: Victor Perez <victor.perez@codeplay.com>

show more ...


# ac1b69b9 29-Jun-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Add debug label intrinsic

This revision adds support for the llvm.dbg.label.intrinsic
and the corresponding DILabel metadata.

Reviewed By: Dinistro

Differential Revision: https://revi

[mlir][llvm] Add debug label intrinsic

This revision adds support for the llvm.dbg.label.intrinsic
and the corresponding DILabel metadata.

Reviewed By: Dinistro

Differential Revision: https://reviews.llvm.org/D153975

show more ...


# 4af24585 16-May-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Add expect intrinsics.

The revision adds the LLVM expect and expect.with.probability
intrinsics.

Reviewed By: Dinistro, ftynse

Differential Revision: https://reviews.llvm.org/D150643


# f03b8956 03-Feb-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Use tablegen for enum conversion.

The revision uses tablegen to convert multiple atomic and comparison
related enums automatically rather than using hand coded functions
in the import a

[mlir][llvm] Use tablegen for enum conversion.

The revision uses tablegen to convert multiple atomic and comparison
related enums automatically rather than using hand coded functions
in the import and export from and to LLVM IR.

The revision also adds additional binary operation cases to the
AtomicBinOp enum that have not been supported till now. It also
introduces the possibility to define unsupported enum cases that exist
only in LLVM IR and that are not imported into MLIR. These unsupported
cases are helpful to handle sentinel values such as BAD_BINOP that
LLVM commonly uses to terminate its enums.

Reviewed By: Dinistro

Differential Revision: https://reviews.llvm.org/D143189

show more ...


# 0cf06639 03-Jan-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Make the import of LLVM IR metadata extensible.

This revision extends the LLVMImportDialectInterface to make the import
of LLVM IR instruction-level metadata extensible. It extends the

[mlir][llvm] Make the import of LLVM IR metadata extensible.

This revision extends the LLVMImportDialectInterface to make the import
of LLVM IR instruction-level metadata extensible. It extends the
signature of the existing dialect interface to provide a method to
import specific metadata kinds and attach them to the imported
operation. The conversion function can rely on the ModuleImport class
to perform support tasks.

The revision implements the second part of the
"extensible llvm ir import" rfc:
https://discourse.llvm.org/t/rfc-extensible-llvm-ir-import/67256/6

The interface method names changed a bit compared to the suggested
design. The hook to set the instruction level metadata is now called
setMetadataAttrs and takes the metadata kind as an additional parameter.
We do not hand in the original LLVM IR instruction since it is not used
at this point. Importing named module-level meta data can be added in a
later stage after gaining some experience with this extension mechanism.

Depends on D140374

Reviewed By: ftynse, Dinistro

Differential Revision: https://reviews.llvm.org/D140556

show more ...


# cf487cce 02-Jan-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Make the import of LLVM IR intrinsics extensible.

The revision introduces the LLVMImportDialectInterface to make the
import of LLVM IR intrinsics extensible. It uses a dialect interface

[mlir][llvm] Make the import of LLVM IR intrinsics extensible.

The revision introduces the LLVMImportDialectInterface to make the
import of LLVM IR intrinsics extensible. It uses a dialect interface
that enables external projects to provide their own conversion functions
for custom intrinsics. These conversion functions can rely on the
ModuleImport class to perform support tasks such as mapping LLVM
values to MLIR values or for converting types between the two worlds.

The implementation largely mirrors the export implementation. One major
difference is the dispatch to the appropriate dialect interface, since
LLVM IR intrinsics have no direct association to an MLIR dialect. The
dialect interfaces thus have to publish the supported intrinsics to
ensure incoming conversion calls are dispatched to the right dialect
interface.

The revision implements the extensible intrinsic import discussed as
part of the "extensible llvm ir import" rfc:
https://discourse.llvm.org/t/rfc-extensible-llvm-ir-import/67256/6

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D140374

show more ...


# cbb09813 17-Dec-2022 Fangrui Song <i@maskray.me>

[mlir] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS

[mlir] llvm::Optional::value => operator*/operator->

std::optional::value() has undesired exception checking semantics and is
unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The
call sites block std::optional migration.

show more ...


# 38e87e8a 09-Dec-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Improve LLVM IR import error handling.

Instead of exiting in the middle of the import handle errors more
gracefully by printing an error message and returning failure. The
revision hand

[mlir][llvm] Improve LLVM IR import error handling.

Instead of exiting in the middle of the import handle errors more
gracefully by printing an error message and returning failure. The
revision handles and tests the import of unsupported instructions,
values, constants, and intrinsics.

Depends on D139404

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D139405

show more ...


# be4b4940 29-Nov-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Import debug intrinsics from LLVMIR.

Currently, the import of LLVMIR fails if the program contains debug
intrinsics. The revision adds support to import debug intrinsics that
have no de

[mlir][llvm] Import debug intrinsics from LLVMIR.

Currently, the import of LLVMIR fails if the program contains debug
intrinsics. The revision adds support to import debug intrinsics that
have no debug expression attached and drops all debug intrinsics with a
non-empty debug expression. It also moves the existing debug intrinsics
into the "intr" namespace by deriving from LLVM_IntrOp.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D138405

show more ...


# bc270f9e 18-Nov-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Iterative constant import from LLVM IR.

Instead of importing constant expressions recursively, the revision
walks all dependencies of an LLVM constant iteratively. The actual
conversion

[mlir][llvm] Iterative constant import from LLVM IR.

Instead of importing constant expressions recursively, the revision
walks all dependencies of an LLVM constant iteratively. The actual
conversion then iterates over a list of constants and all intermediate
constant values are added to the value mapping. As a result, an LLVM IR
constant maps to exactly one MLIR operation per function. The revision
adapts the existing tests since the constant ordering changed for
aggregate types. Additionally, it adds extra tests that mix aggregate
constants and constant expressions.

Depends on D137416

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D137559

show more ...


# 5942456a 17-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Add support for importing masked intrinsics from LLVM IR.

The revision adds support for importing the masked load/store and
gather/scatter intrinsics from LLVM IR. To enable the import,

[mlir][llvm] Add support for importing masked intrinsics from LLVM IR.

The revision adds support for importing the masked load/store and
gather/scatter intrinsics from LLVM IR. To enable the import, the
revision also includes an extension of the mlirBuilder code generation
to support variadic arguments.

Depends on D136057

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D136058

show more ...


# f471acfd 17-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Use the tablegen error handling (NFC).

Use PrintError to extend the error message with location information in
LLVMIRConversionGen.cpp. Additionally, promote potentially user facing
err

[mlir][llvm] Use the tablegen error handling (NFC).

Use PrintError to extend the error message with location information in
LLVMIRConversionGen.cpp. Additionally, promote potentially user facing
error messages from assertions to real errors.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D136057

show more ...


# cc49a74a 13-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Use TableGen to import compare ops from LLVM IR.

The revision imports compare operations using TableGen generated
builders, instead of using the special handlers defined by the Importer

[mlir][llvm] Use TableGen to import compare ops from LLVM IR.

The revision imports compare operations using TableGen generated
builders, instead of using the special handlers defined by the Importer.
It therefore adds a new llvmArgIndexes field that allows to specify
a mapping between MLIR argument and LLVM IR operand indexes if they do
not match. Additionally, the FCmp op is extended with an additional
builder and all compare operations are extended with verification
traits to ensure the operands types match. These extensions simplify
the logic of the newly introduced builders and are in line with the
compare operations define by the arithmetic dialect.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D135855

show more ...


# 8446f24e 12-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Tablegen based operation import from LLVM IR.

The revision uses tablegen generated builders to convert the most common
LLVM IR instructions to MLIR LLVM dialect operations. All instruct

[mlir][llvm] Tablegen based operation import from LLVM IR.

The revision uses tablegen generated builders to convert the most common
LLVM IR instructions to MLIR LLVM dialect operations. All instructions
with special handlers, except for alloca and fence, still use manual
handlers. The revision also introduces an additional "instructions.ll"
test file to test the import of instructions that have tablegen builders
(except for the resume instruction whose test remains untouched). A part
of the test cases are new, for example the integer instruction test,
while others are migrated from the "basic.ll" test file.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D135709

show more ...


# a2122a09 11-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Introduce a mapValue function in LLVMIR import (nfc).

The revision adds a mapValue function to the Importer, which can be used
in the MLIR builders to provide controlled accesses to the

[mlir][llvm] Introduce a mapValue function in LLVMIR import (nfc).

The revision adds a mapValue function to the Importer, which can be used
in the MLIR builders to provide controlled accesses to the result
mapping of the imported instructions. Additionally, the change allows us
to avoid accessing a private member variable of the Importer class,
which simplifies future refactorings that aim at factoring out a
conversion interface (similar to the MLIR to LLVM translation). The
revision also renames the variables used when emitting the MLIR builders
to prepare the generalization to non-intrinsic instructions. In
particular, it renames callInst to inst and it passes in the instruction
arguments using an llvmOperands array rather than accessing the call
arguments directly.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D135645

show more ...


# d85f6e5d 07-Oct-2022 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvmir] Import intrinsics with attributes from LLVMIR.

The revision adds support to specify custom import functions for
LLVM IR intrinsics with immediate arguments that translate to MLIR
attr

[mlir][llvmir] Import intrinsics with attributes from LLVMIR.

The revision adds support to specify custom import functions for
LLVM IR intrinsics with immediate arguments that translate to MLIR
attributes. It takes an approach similar to the MLIR to LLVM translation
that uses a tablegen defined build method. The default implementation
of this newly introduced "mlirBuilder" assumes all intrinsic arguments
translate to operands. Specific intrinsics, such as
llvm.lifetime.start/stop then define a custom builder that converts
their immediate arguments to MLIR attributes.

Depends on D135349

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D135350

show more ...


# 42c17073 30-May-2022 jacquesguan <Jianjian.Guan@streamcomputing.com>

[mlir] Support import llvm intrinsics.

This patch supports to convert the llvm intrinsic to the corresponding op. It still leaves some intrinsics to be handled specially.

Reviewed By: ftynse

Diffe

[mlir] Support import llvm intrinsics.

This patch supports to convert the llvm intrinsic to the corresponding op. It still leaves some intrinsics to be handled specially.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D126639

show more ...


# 0252357b 27-May-2022 Alexander Batashev <alexbatashev@outlook.com>

[mlir][LLVM] Add support for Calling Convention in LLVMFuncOp

This patch adds support for Calling Convention attribute in LLVM
dialect, including enums, custom syntax and import from LLVM IR.
Additi

[mlir][LLVM] Add support for Calling Convention in LLVMFuncOp

This patch adds support for Calling Convention attribute in LLVM
dialect, including enums, custom syntax and import from LLVM IR.
Additionally fix import of dso_local attribute.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D126161

show more ...


# e5639b3f 22-Dec-2021 Mehdi Amini <joker.eph@gmail.com>

Fix more clang-tidy cleanups in mlir/ (NFC)


# 62fea88b 01-Dec-2021 Jacques Pienaar <jpienaar@google.com>

[mlir] Update accessors prefixed form (NFC)


# 12875ed9 17-Feb-2021 Alex Zinenko <zinenko@google.com>

[mlir] generate enum translation functions with unused attribute

The functions translating enums to LLVM IR are generated in a single
file included in many places, not all of which use all translati

[mlir] generate enum translation functions with unused attribute

The functions translating enums to LLVM IR are generated in a single
file included in many places, not all of which use all translations.
Generate functions with "unused" attribute to silence compiler warnings.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96880

show more ...


12