[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Feb 27 16:49:03 PST 2003
Changes in directory llvm/include/llvm/Analysis:
LoopInfo.h updated: 1.22 -> 1.23
---
Log message:
Add new Loop::hasExitBlock helper method
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.22 llvm/include/llvm/Analysis/LoopInfo.h:1.23
--- llvm/include/llvm/Analysis/LoopInfo.h:1.22 Thu Feb 27 16:37:35 2003
+++ llvm/include/llvm/Analysis/LoopInfo.h Thu Feb 27 16:48:28 2003
@@ -69,6 +69,15 @@
///
unsigned getNumBackEdges() const;
+ /// hasExitBlock - Return true if the current loop has the specified block as
+ /// an exit block...
+ bool hasExitBlock(BasicBlock *BB) const {
+ for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
+ if (ExitBlocks[i] == BB)
+ return true;
+ return false;
+ }
+
/// getLoopPreheader - If there is a preheader for this loop, return it. A
/// loop has a preheader if there is only one edge to the header of the loop
/// from outside of the loop. If this is the case, the block branching to the
More information about the llvm-commits
mailing list