llvm.org GIT mirror llvm / 4d4872e
[SCEV] Revise a method description to match actual behavior [NFC] Reword the ScalarEvolution::getExitCount comment in the same terminology as used by getBackedgeTakenCount since they're equivelent for single exit loops. Also, strengthen the comment to indicate exiting on the exact iteration specified is guaranteed. Several transforms implicitly rely on this; and the actual implementation checks for it (via dominating latch checks). So, spell out the guarantee in the comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363867 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 26 days ago
1 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
745745 unsigned getSmallConstantTripMultiple(const Loop *L,
746746 BasicBlock *ExitingBlock);
747747
748 /// Get the expression for the number of loop iterations for which this loop
749 /// is guaranteed not to exit via ExitingBlock. Otherwise return
750 /// SCEVCouldNotCompute.
748 /// Return the number of times the backedge executes before the given exit
749 /// would be taken; if not exactly computable, return SCEVCouldNotCompute.
750 /// For a single exit loop, this value is equivelent to the result of
751 /// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit)
752 /// before the backedge is executed (ExitCount + 1) times. Note that there
753 /// is no guarantee about *which* exit is taken on the exiting iteration.
751754 const SCEV *getExitCount(const Loop *L, BasicBlock *ExitingBlock);
752755
753756 /// If the specified loop has a predictable backedge-taken count, return it,