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

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Tue Apr 30 11:36:50 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());
----------------
tblah wrote:

It is run on a module when invoked with fir-opt in tests, but in the real pipeline it is run in parallel on each top level operation (see the tests printing the pass pipeline)

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


More information about the flang-commits mailing list