[Lldb-commits] [mlir] [lldb] [llvm] [mlir] Introduce replaceWithZeroTripCheck in LoopLikeOpInterface (PR #80331)

Jerry Wu via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 2 14:12:56 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 the trick part of adding zero-trip-check is to do loop rotation when the loop condition has side-effects. So if we simply return the loop condition, callers will need to implement loop rotation by themselves for each loop op, which can be complicated.

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


More information about the lldb-commits mailing list