forked from OSchip/llvm-project
[UnJ] Rename hasInvariantIterationCount to hasIterationCountInvariantInParent NFC
This hopefully describes the API of the function more precisely. llvm-svn: 339762
This commit is contained in:
parent
51cee894da
commit
6cb6478739
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue