mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 02:38:04 +00:00
b77bac0572
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 |
||
---|---|---|
.. | ||
Analysis | ||
Bindings | ||
CAPI | ||
Conversion | ||
Dialect | ||
EDSC | ||
ExecutionEngine | ||
Interfaces | ||
IR | ||
Parser | ||
Pass | ||
Reducer | ||
Rewrite | ||
Support | ||
TableGen | ||
Target | ||
Transforms | ||
Translation | ||
CMakeLists.txt |