================ @@ -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 ---------------- dcaballe wrote:
Would it make sense to start with `scf.if` and generalize later as needed? I think it's worth clarifying that loop rotation will only be possible for `scf.while` ops for now, that is, turning regular a "while-do" into a "do-while". That kind of rotation won't be possible at this level of abstraction for `scf.for`, hence the comment about redundant first iteration check. I think the rotation responsibility belongs to the interface itself. If we want to make it extra configurable, we could separate the zero-trip-check method from the rotation method... 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