From 45528b1d6a17a813719778645fa5e0e18d2b3e9c Mon Sep 17 00:00:00 2001 From: Ronan Keryell Date: Mon, 9 Dec 2024 12:49:27 -0800 Subject: [PATCH] [CIR] Add all the missing ClangIR passes to aie-opt --- tools/aie-opt/aie-opt.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tools/aie-opt/aie-opt.cpp b/tools/aie-opt/aie-opt.cpp index a5d91e2643..3e4b05ab25 100644 --- a/tools/aie-opt/aie-opt.cpp +++ b/tools/aie-opt/aie-opt.cpp @@ -66,13 +66,42 @@ int main(int argc, char **argv) { mlir::registerPass([]() -> std::unique_ptr { return cir::createConvertMLIRToLLVMPass(); }); + mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> { + return mlir::createCIRCanonicalizePass(); + }); mlir::registerPass([]() -> std::unique_ptr { return mlir::createCIRSimplifyPass(); }); - + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createLifetimeCheckPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createDropASTPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createLoweringPreparePass(); + }); mlir::registerPass([]() -> std::unique_ptr { return mlir::createSCFPreparePass(); }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createHoistAllocasPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createGotoSolverPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createIdiomRecognizerPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createLibOptPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return mlir::createCallConvLoweringPass(); + }); + mlir::registerPass([]() -> std::unique_ptr { + return cir::createConvertCIRToMLIRPass(); + }); mlir::registerPass([]() -> std::unique_ptr { return cir::createConvertCIRToMLIRPass(); });