[flang-commits] [flang] [flang] Adapt PolymorphicOpConversion to run on all top level ops (PR #90597)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Tue Apr 30 15:40:10 PDT 2024


================
@@ -229,7 +229,9 @@ class PolymorphicOpConversion
 
   void runOnOperation() override {
     auto *context = &getContext();
-    auto mod = getOperation()->getParentOfType<ModuleOp>();
+    auto mod = mlir::dyn_cast_or_null<mlir::ModuleOp>(getOperation());
----------------
vzakhari wrote:

I agree with Renaud that the mutex is not functional as-is.  Each instance of the pass will have its own mutex, so the parallel modifications of the parent module operation cause a race.

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


More information about the flang-commits mailing list