[UnJ] Rename hasInvariantIterationCount to hasIterationCountInvariantInParent NFC

This hopefully describes the API of the function more precisely.

llvm-svn: 339762
This commit is contained in:
David Green 2018-08-15 10:59:41 +00:00
parent 51cee894da
commit 6cb6478739
3 changed files with 4 additions and 4 deletions

View File

@ -492,7 +492,7 @@ Optional<unsigned> getLoopEstimatedTripCount(Loop *L);
/// Check inner loop (L) backedge count is known to be invariant on all iterations
/// of its outer loop. If the loop has no parent, this is trivially true.
bool hasInvariantIterationCount(Loop *L, ScalarEvolution &SE);
bool hasIterationCountInvariantInParent(Loop *L, ScalarEvolution &SE);
/// Helper to consistently add the set of standard passes to a loop pass's \c
/// AnalysisUsage.

View File

@ -754,7 +754,7 @@ bool llvm::isSafeToUnrollAndJam(Loop *L, ScalarEvolution &SE, DominatorTree &DT,
// Check inner loop backedge count is consistent on all iterations of the
// outer loop
if (!hasInvariantIterationCount(SubLoop, SE)) {
if (!hasIterationCountInvariantInParent(SubLoop, SE)) {
LLVM_DEBUG(dbgs() << "Won't unroll-and-jam; Inner loop iteration count is "
"not consistent on each iteration\n");
return false;

View File

@ -1521,8 +1521,8 @@ Optional<unsigned> llvm::getLoopEstimatedTripCount(Loop *L) {
return (FalseVal + (TrueVal / 2)) / TrueVal;
}
bool llvm::hasInvariantIterationCount(Loop *InnerLoop,
ScalarEvolution &SE) {
bool llvm::hasIterationCountInvariantInParent(Loop *InnerLoop,
ScalarEvolution &SE) {
Loop *OuterL = InnerLoop->getParentLoop();
if (!OuterL)
return true;