[flang-commits] [flang] [flang] Add the MLIR pass pipelines for dumping (PR #183144)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon Mar 2 04:22:06 PST 2026


================
@@ -133,6 +138,32 @@ inline void registerMLIRPassesForFortranTools() {
   mlir::registerLowerAffinePass();
 }
 
+/// Register the passes used in flang's MLIR pass pipeline so that
+/// --mlir-print-ir-before=<pass> and --mlir-print-ir-after=<pass> work.
+/// This must be called BEFORE mlir::registerPassManagerCLOptions() because
+/// that function creates the PassNameCLParser which snapshots the pass
+/// registry during initialization.
+inline void registerFlangPipelinePasses() {
----------------
tblah wrote:

nit: please move this into InitFIR.cpp alongside `registerLLVMTranslation`

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


More information about the flang-commits mailing list