[libcxx] [mlir] [lldb] [llvm] [compiler-rt] [clang] [libc] [clang-tools-extra] [lld] [MLIR][LLVM] Add Continuous Loop Peeling transform to SCF (PR #71555)

Matthias Springer via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 8 06:16:58 PST 2024


================
@@ -105,6 +106,167 @@ static void specializeForLoopForUnrolling(ForOp op) {
   op.erase();
 }
 
+/// Create a new for loop for the remaining iterations (partiaIteration)
+/// after a for loop has been peeled. This is followed by correcting the
+/// loop bounds for both loops given the index (splitBound) where the
+/// iteration space is to be split up.
+static LogicalResult splitLoopHelper(RewriterBase &b, scf::ForOp forOp,
+                                     scf::ForOp &partialIteration,
+                                     Value &splitBound) {
----------------
matthias-springer wrote:

Do not pass `splitBound` as reference. Otherwise it looks like a return value.

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


More information about the cfe-commits mailing list