[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 17:00:46 PST 2025


================
@@ -2958,8 +2958,13 @@ defm clangir : BoolFOption<"clangir",
   BothFlags<[], [ClangOption, CC1Option], "">>;
 def emit_cir : Flag<["-"], "emit-cir">, Visibility<[ClangOption, CC1Option]>,
   Group<Action_Group>, HelpText<"Build ASTs and then lower to ClangIR">;
-def emit_core_mlir : Flag<["-"], "emit-core-mlir">, Visibility<[CC1Option]>, Group<Action_Group>,
-  HelpText<"Build ASTs and then lower through ClangIR to core MLIR dialects, emit the .milr file">;
+def emit_mlir_EQ : Joined<["-"], "emit-mlir=">, Visibility<[CC1Option]>, Group<Action_Group>,
+  HelpText<"Build ASTs and then generate/lower to the selected MLIR dialect, emit the .mlir or .cir file. "
+  "Allowed values are `core` for MLIR core dialects and `cir` for ClangIR">,
+  Values<"core,cir">,
----------------
bcardosolopes wrote:

In CIR terms, considering we want to cover DirectToLLVM, ThroughMLIR (core) and CIR, shouldn't this be 3 state: `core,llvm,cir`? 

https://github.com/llvm/llvm-project/pull/127835


More information about the cfe-commits mailing list