[Lldb-commits] [lldb] [mlir] [llvm] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)
Jerry Wu via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 5 13:52:10 PST 2024
================
@@ -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
----------------
pzread wrote:
I think whether the loop rotation is needed (or possible) is the implementation details of each type of loop. `scf.while` needs it because the before block is in the loop and can contain ops with side-effects. `scf.for` is simpler as the `lb < ub` should have no side-effect and lightweight, which can be run twice (for `scf.if` and the for loop)
https://github.com/llvm/llvm-project/pull/80331
More information about the lldb-commits
mailing list