Rename isLoopExit to isLoopExiting, for consistency with the wording
authorDan Gohman <gohman@apple.com>
Sat, 24 Oct 2009 23:34:26 +0000 (23:34 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 24 Oct 2009 23:34:26 +0000 (23:34 +0000)
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.

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

include/llvm/Analysis/LoopInfo.h
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/Transforms/Scalar/LoopRotation.cpp

index 763111063d01bd10d5c7fdace3f12462b366983f..bc87adbfc79e12c8cf3bcf0564c70ea78fefa682 100644 (file)
@@ -114,10 +114,10 @@ public:
   block_iterator block_begin() const { return Blocks.begin(); }
   block_iterator block_end() const { return Blocks.end(); }
 
-  /// isLoopExit - True if terminator in the block can branch to another block
+  /// isLoopExiting - True if terminator in the block can branch to another block
   /// that is outside of the current loop.
   ///
-  bool isLoopExit(const BlockT *BB) const {
+  bool isLoopExiting(const BlockT *BB) const {
     typedef GraphTraits<BlockT*> BlockTraits;
     for (typename BlockTraits::ChildIteratorType SI =
          BlockTraits::child_begin(const_cast<BlockT*>(BB)),
@@ -465,7 +465,7 @@ public:
       WriteAsOperand(OS, BB, false);
       if (BB == getHeader())    OS << "<header>";
       if (BB == getLoopLatch()) OS << "<latch>";
-      if (isLoopExit(BB))       OS << "<exit>";
+      if (isLoopExiting(BB))    OS << "<exiting>";
     }
     OS << "\n";
 
index 827d6dc5f40cfada5761a7889b01a52a19d165ee..0672b56fd432d9a3b51c05235a1002831a71c4a0 100644 (file)
@@ -2565,7 +2565,7 @@ void SimpleRegisterCoalescing::CalculateSpillWeights() {
     LiveIndex MBBEnd = li_->getMBBEndIdx(MBB);
     MachineLoop* loop = loopInfo->getLoopFor(MBB);
     unsigned loopDepth = loop ? loop->getLoopDepth() : 0;
-    bool isExit = loop ? loop->isLoopExit(MBB) : false;
+    bool isExiting = loop ? loop->isLoopExiting(MBB) : false;
 
     for (MachineBasicBlock::const_iterator mii = MBB->begin(), mie = MBB->end();
          mii != mie; ++mii) {
@@ -2599,7 +2599,7 @@ void SimpleRegisterCoalescing::CalculateSpillWeights() {
 
         LiveInterval &RegInt = li_->getInterval(Reg);
         float Weight = li_->getSpillWeight(HasDef, HasUse, loopDepth);
-        if (HasDef && isExit) {
+        if (HasDef && isExiting) {
           // Looks like this is a loop count variable update.
           LiveIndex DefIdx =
             li_->getDefIndex(li_->getInstructionIndex(MI));
index c8cbad479a33ae24ebb3d602fa089a03d05032be..6e0f67b67296fb2124f4762d75546f9788093949 100644 (file)
@@ -118,7 +118,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
   // If the loop header is not one of the loop exiting blocks then
   // either this loop is already rotated or it is not
   // suitable for loop rotation transformations.
-  if (!L->isLoopExit(OrigHeader))
+  if (!L->isLoopExiting(OrigHeader))
     return false;
 
   BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator());