[PATCH] D44677: [SCEV] Make computeExitLimit more simple and more powerful

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 08:39:25 PDT 2018


sanjoy added a comment.

Given how many places we've had to add SE->forgetTopmostLoop after this pass, I'm wondering if this change violated some poorly specified SCEV invariant.  In particular, previously had we called `computeExitLimit` on an exiting block in an loop inner to `L` we'd always conclude said exiting block was not "always executed the same number of times as the loop" because we'd bail out of the backwards climb at the header of the inner loop (which cannot have a `getUniquePredecessor`).  What do you think?



================
Comment at: lib/Analysis/ScalarEvolution.cpp:6895
+  // If our exiting block does not dominate the latch, then its connection with
+  // loop's exit limit may be far from trivial.
+  const BasicBlock *Latch = L->getLoopLatch();
----------------
"far from trivial" is too vague -- can you please rewrite this bit to be more specific?


Repository:
  rL LLVM

https://reviews.llvm.org/D44677





More information about the llvm-commits mailing list