[llvm-branch-commits] [flang] [flang][CodeGen] Run PreCGRewrite on omp reduction declare ops (PR #84954)

Valentin Clement バレンタイン クレメン via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 14 09:37:09 PDT 2024


================
@@ -314,11 +314,8 @@ class CodeGenRewrite : public fir::impl::CodeGenRewriteBase<CodeGenRewrite> {
 
   void runOnOperation() override final {
     // Call runOn on all top level regions that may contain emboxOp/arrayCoorOp.
-    auto mod = getOperation();
-    for (auto func : mod.getOps<mlir::func::FuncOp>())
-      runOn(func, func.getBody());
-    for (auto global : mod.getOps<fir::GlobalOp>())
-      runOn(global, global.getRegion());
+    mlir::ModuleOp mod = getOperation();
+    runOn(mod);
----------------
clementval wrote:

nit: merge `ronOn()` in `runOnOperation()` since it has only a single use now. 

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


More information about the llvm-branch-commits mailing list