[polly] [Polly] Consider all conditions in loop for its unbounded parameter values (PR #226549)

Timur Baidusenov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 05:26:19 PDT 2026


================
@@ -794,6 +783,24 @@ bool ScopBuilder::addLoopBoundsToHeaderDomain(
     UnionBackedgeCondition = UnionBackedgeCondition.unite(BackedgeCondition);
   }
 
+  // Parameter values for which a branch condition inside the loop is not
+  // modeled correctly. The domains of the latches are derived from all these
+  // conditions, not only from the conditions of the latches themselves: the
+  // exit condition may be in another block, e.g. the header with an
+  // unconditional latch, and any other condition may decide whether the exit
+  // condition is evaluated at all. Collect them before the header's domain is
+  // restricted to the loop bounds, since the domains of the other blocks are
+  // later derived from it.
----------------
bai-tim wrote:

I’ll reconsider my approach now. Sorry

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


More information about the llvm-commits mailing list