]> granicus.if.org Git - llvm/commitdiff
[IndVars] Add a todo to reflect a further oppurtunity identified in D69009
authorPhilip Reames <listmail@philipreames.com>
Sun, 20 Oct 2019 23:44:01 +0000 (23:44 +0000)
committerPhilip Reames <listmail@philipreames.com>
Sun, 20 Oct 2019 23:44:01 +0000 (23:44 +0000)
Nikita pointed out an oppurtunity, might as well document it in the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375380 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/IndVarSimplify.cpp

index 2981c149acad57d57b24618f69ed8a1465ce89c1..295e0723dae2083c8f9e3e7529a5dd88252906b8 100644 (file)
@@ -2794,6 +2794,13 @@ bool IndVarSimplify::optimizeLoopExits(Loop *L, SCEVExpander &Rewriter) {
       Changed = true;
       continue;
     }
+
+    // TODO: There might be another oppurtunity to leverage SCEV's reasoning
+    // here.  If we kept track of the min of dominanting exits so far, we could
+    // discharge exits with EC >= MDEC. This is less powerful than the existing
+    // transform (since later exits aren't considered), but potentially more
+    // powerful for any case where SCEV can prove a >=u b, but neither a == b
+    // or a >u b.  Such a case is not currently known.
   }
   return Changed;
 }