================ @@ -220,6 +220,31 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> { /*defaultImplementation=*/[{ return ::mlir::failure(); }] + >, + InterfaceMethod<[{ + Add a zero-trip-check around the loop to check if the loop body is ever + run and return the new loop inside the check. The loop body is moved ---------------- pzread wrote:
Sometimes it is easier to create a new loop because we need to rotate the loop (`while {}` -> `do {} while`); otherwise the condition ops will be run twice and might have unwanted side effect. See the implementation of while loop as a example: #80349 We can still rotate the loop without creating a new op, but that will involve many tricky block arguments/operands updates. So I think it might be easier to allow this method to return a new loop op. https://github.com/llvm/llvm-project/pull/80331 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits