[all-commits] [llvm/llvm-project] 41035f: [MLIR][IRDL] Added IRDL to C++ Translation (#133982)
Ivan Ho via All-commits
all-commits at lists.llvm.org
Fri May 2 05:19:27 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41035f4aa8139353a532509e5d4406dbb07446ac
https://github.com/llvm/llvm-project/commit/41035f4aa8139353a532509e5d4406dbb07446ac
Author: Ivan Ho <ivan.ho at cl.cam.ac.uk>
Date: 2025-05-02 (Fri, 02 May 2025)
Changed paths:
M mlir/CMakeLists.txt
M mlir/cmake/modules/CMakeLists.txt
A mlir/cmake/modules/IRDLToCpp.cmake
M mlir/cmake/modules/MLIRConfig.cmake.in
M mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
M mlir/include/mlir/InitAllTranslations.h
A mlir/include/mlir/Target/IRDLToCpp/IRDLToCpp.h
A mlir/include/mlir/Target/IRDLToCpp/TranslationRegistration.h
M mlir/lib/Dialect/IRDL/IR/IRDL.cpp
M mlir/lib/Target/CMakeLists.txt
A mlir/lib/Target/IRDLToCpp/CMakeLists.txt
A mlir/lib/Target/IRDLToCpp/IRDLToCpp.cpp
A mlir/lib/Target/IRDLToCpp/Templates/DialectDecl.txt
A mlir/lib/Target/IRDLToCpp/Templates/DialectDef.txt
A mlir/lib/Target/IRDLToCpp/Templates/Header.txt
A mlir/lib/Target/IRDLToCpp/Templates/PerOperationDecl.txt
A mlir/lib/Target/IRDLToCpp/Templates/PerOperationDef.txt
A mlir/lib/Target/IRDLToCpp/Templates/TypeDecl.txt
A mlir/lib/Target/IRDLToCpp/Templates/TypeDef.txt
A mlir/lib/Target/IRDLToCpp/Templates/TypeHeaderDecl.txt
A mlir/lib/Target/IRDLToCpp/Templates/TypeHeaderDef.txt
A mlir/lib/Target/IRDLToCpp/TemplatingUtils.h
A mlir/lib/Target/IRDLToCpp/TranslationRegistration.cpp
M mlir/test/Dialect/IRDL/invalid.irdl.mlir
A mlir/test/Dialect/IRDL/invalid_names.irdl.mlir
M mlir/test/Dialect/IRDL/regions-ops.irdl.mlir
M mlir/test/lib/Dialect/CMakeLists.txt
A mlir/test/lib/Dialect/TestIRDLToCpp/CMakeLists.txt
A mlir/test/lib/Dialect/TestIRDLToCpp/TestIRDLToCppDialect.cpp
A mlir/test/lib/Dialect/TestIRDLToCpp/TestIRDLToCppDialect.h
A mlir/test/lib/Dialect/TestIRDLToCpp/test.testd.mlir
A mlir/test/lib/Dialect/TestIRDLToCpp/test_conversion.testd.mlir
A mlir/test/lib/Dialect/TestIRDLToCpp/test_irdl_to_cpp.irdl.mlir
A mlir/test/lib/Dialect/TestIRDLToCpp/test_irdl_to_cpp_invalid_unsupported_types.irdl.mlir
M mlir/test/tblgen-to-irdl/TestDialect.td
A mlir/tools/mlir-irdl-to-cpp/CMakeLists.txt
A mlir/tools/mlir-irdl-to-cpp/mlir-irdl-to-cpp.cpp
M mlir/tools/mlir-opt/CMakeLists.txt
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[MLIR][IRDL] Added IRDL to C++ Translation (#133982)
This PR introduces a new tool, mlir-irdl-to-cpp, that converts IRDL to
C++ definitions.
The C++ definitions allow use of the IRDL-defined dialect in MLIR C++
infrastructure, enabling the use of conversion patterns with IRDL
dialects for example. This PR also adds CMake utilities to easily
integrate the IRDL dialects into MLIR projects.
Note that most IRDL features are not supported. In general, we are only
able to define simple types and operations.
- The only type constraint supported is `irdl.any`.
- Variadic operands and results are not supported.
- Verifiers for the IRDL constraints are not generated.
- Attributes are not supported.
---------
Co-authored-by: Théo Degioanni <theo.degioanni.llvm.deluge062 at simplelogin.fr>
Co-authored-by: Fehr Mathieu <mathieu.fehr at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list