[flang-commits] [flang] [Flang] Add new ConvertComplexPow pass for Flang (PR #158642)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Mon Sep 15 09:08:40 PDT 2025


================
@@ -551,6 +551,17 @@ def SimplifyFIROperations : Pass<"simplify-fir-operations", "mlir::ModuleOp"> {
       "Prefer expanding without using Fortran runtime calls.">];
 }
 
+def ConvertComplexPow : Pass<"convert-complex-pow", "mlir::func::FuncOp"> {
----------------
tblah wrote:

This must be a pass on the whole module because adding the runtime functions mutates the module. Otherwise MLIR will run the pass concurrently on different functions and there can be race conditions between checking if a function declaration has been added to the module and actually adding it.

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


More information about the flang-commits mailing list