[flang-commits] [flang] [flang][fir]: New optimizer transform of `fir.if` to `scf.if`. (PR #149959)

Terapines MLIR via flang-commits flang-commits at lists.llvm.org
Tue Jul 22 19:48:50 PDT 2025


================
@@ -87,13 +87,52 @@ struct DoLoopConversion : public OpRewritePattern<fir::DoLoopOp> {
     return success();
   }
 };
+
+void copyBlocksAndTransformResult(PatternRewriter &rewriter, Block &srcBlock,
----------------
terapines-osc-mlir wrote:

> I think this should be a lambda instead

Copying block and transforming terminator is a common operation which can be shared by other functions in this file.  Since all Fir to SCF transforms will be written in this file, I would like to keep this function this way for now.

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


More information about the flang-commits mailing list