[Mlir-commits] [mlir] [MLIR][SCF] Define `-scf-rotate-while` pass (PR #99850)

Ivan Butygin llvmlistbot at llvm.org
Tue Jul 23 02:43:55 PDT 2024


================
@@ -85,6 +86,10 @@ void populateSCFForLoopCanonicalizationPatterns(RewritePatternSet &patterns);
 ///  * `after` block containing arith.addi
 void populateUpliftWhileToForPatterns(RewritePatternSet &patterns);
 
+/// Populate patterns to rotate `scf.while` ops, constructing `do-while` loops
+/// from `while` loops.
+void populateSCFRotateWhileLoopPatterns(
+    RewritePatternSet &patterns, const SCFRotateWhileLoopPassOptions &options);
----------------
Hardcode84 wrote:

Do you want to use pass itself or you plan to use `populateSCFRotateWhileLoopPatterns` to combine with other patterns?

If you only need pass, using direct loop like in test pass instead of greedy rewriter may be a better solution.


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


More information about the Mlir-commits mailing list