OSDN Git Service

[UnJ] Rename hasInvariantIterationCount to hasIterationCountInvariantInParent NFC
authorDavid Green <david.green@arm.com>
Wed, 15 Aug 2018 10:59:41 +0000 (10:59 +0000)
committerDavid Green <david.green@arm.com>
Wed, 15 Aug 2018 10:59:41 +0000 (10:59 +0000)
This hopefully describes the API of the function more precisely.

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

include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Utils/LoopUnrollAndJam.cpp
lib/Transforms/Utils/LoopUtils.cpp

index a9193c7..0d3688b 100644 (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.
index 1a05bf4..1ce2f84 100644 (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;
index e9db472..3560a49 100644 (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;