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

Victor Perez llvmlistbot at llvm.org
Mon Jul 22 02:03:50 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);
----------------
victor-eds wrote:

I think annotating the operation might be a better option as it gives callers more flexibility. In my use-case, I don't care much as I won't be using `forceCreateCheck`, but others might be interested.

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


More information about the Mlir-commits mailing list