llvm-capstone/mlir/lib
Alex Zinenko b77bac0572 [mlir] Introduce dialect interfaces for translation to LLVM IR
The existing approach to translation to the LLVM IR relies on a single
translation supporting the base LLVM dialect, extensible through inheritance to
support intrinsic-based dialects also derived from LLVM IR such as NVVM and
AVX512. This approach does not scale well as it requires additional
translations to be created for each new intrinsic-based dialect and does not
allow them to mix in the same module, contrary to the rest of the MLIR
infrastructure. Furthermore, OpenMP translation ingrained itself into the main
translation mechanism.

Start refactoring the translation to LLVM IR to operate using dialect
interfaces. Each dialect that contains ops translatable to LLVM IR can
implement the interface for translating them, and the top-level translation
driver can operate on interfaces without knowing about specific dialects.
Furthermore, the delayed dialect registration mechanism allows one to avoid a
dependency on LLVM IR in the dialect that is translated to it by implementing
the translation as a separate library and only registering it at the client
level.

This change introduces the new mechanism and factors out the translation of the
"main" LLVM dialect. The remaining dialects will follow suit.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D96503
2021-02-12 17:49:44 +01:00
..
Analysis [mlir] Add initial support for an alias analysis framework in MLIR 2021-02-09 14:21:27 -08:00
Bindings [mlir] Add Python bindings for IntegerSet 2021-01-26 17:32:51 +01:00
CAPI [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
Conversion [mlir][Linalg] Improve region support in Linalg ops. 2021-02-12 14:51:03 +00:00
Dialect [mlir][Linalg] NFC - Add an OpFoldResult-based builder for InitTensorOp 2021-02-12 16:03:51 +00:00
EDSC [mlir][IR] Remove the concept of OperationProperties 2021-02-09 12:00:15 -08:00
ExecutionEngine [mlir] Make JitRunnerMain main take a DialectRegistry 2021-02-11 14:50:48 +01:00
Interfaces [mlir][IR] Remove the concept of OperationProperties 2021-02-09 12:00:15 -08:00
IR [mlir] detect integer overflow in debug mode 2021-02-11 18:20:40 -08:00
Parser [mlir][IR] Remove the concept of OperationProperties 2021-02-09 12:00:15 -08:00
Pass Enable Pass::initialize() to fail by returning a LogicalResult 2021-02-11 01:51:53 +00:00
Reducer [mlir] NFC: fix trivial typos 2020-10-29 04:05:22 +09:00
Rewrite Fix a few GCC compiler warnings (NFC) 2021-01-19 06:00:04 +00:00
Support [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
TableGen [mlir][ODS] Allow to specify custom namespace for NativeOpTrait 2021-02-08 10:25:45 +03:00
Target [mlir] Introduce dialect interfaces for translation to LLVM IR 2021-02-12 17:49:44 +01:00
Transforms [mlir] Initialize isSmallAlloc in initialize method. 2021-02-12 10:28:58 +01:00
Translation [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
CMakeLists.txt [mlir][NFC] Move around the code related to PatternRewriting to improve layering 2020-10-26 18:01:06 -07:00