2025 EuroLLVM - Dialects as a Dialect: Bringing native C++ registration to IRDL

2025 EuroLLVM - Dialects as a Dialect: Bringing native C++ registration to IRDL

49 Lượt nghe
2025 EuroLLVM - Dialects as a Dialect: Bringing native C++ registration to IRDL
2025 EuroLLVM Developers' Meeting https://llvm.org/devmtg/2025-04/ ------ Title: Dialects as a Dialect: Bringing native C++ registration to IRDL Speaker: Ivan Ho ------ Slides: https://llvm.org/devmtg/2025-04/slides/lightning_talk/ho_dialects.pdf ----- IRDL allows to define dialects in MLIR in a declarative and easy to analyse fashion. While this feature set was useful on its own, IRDL-defined dialects were not tightly integrated into MLIR: it was notably impossible to realistically use C++ patterns on them, or use dialect conversion with them. We present how we created a new MLIR tool capable of generating C++ definitions for dialects, just like ODS with TableGen. With our tool, IRDL-defined dialects are now tightly integrated into MLIR and indistinguishable from ODS dialects from a user's perspective. We also present how we wish to improve the code template rendering tooling in LLVM. ----- Videos Edited by Bash Films: http://www.BashFilms.com