[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Apr 18 00:38:01 PDT 2004
Changes in directory llvm/include/llvm/Analysis:
LoopInfo.h updated: 1.33 -> 1.34
---
Log message:
Allow clients to delete loops, add a new method
---
Diffs of the changes: (+9 -5)
Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.33 llvm/include/llvm/Analysis/LoopInfo.h:1.34
--- llvm/include/llvm/Analysis/LoopInfo.h:1.33 Thu Apr 15 10:15:40 2004
+++ llvm/include/llvm/Analysis/LoopInfo.h Sun Apr 18 00:37:42 2004
@@ -53,6 +53,10 @@
/// Loop ctor - This creates an empty loop.
Loop() : ParentLoop(0), LoopDepth(0) {
}
+ ~Loop() {
+ for (unsigned i = 0, e = SubLoops.size(); i != e; ++i)
+ delete SubLoops[i];
+ }
unsigned getLoopDepth() const { return LoopDepth; }
BasicBlock *getHeader() const { return Blocks.front(); }
@@ -192,11 +196,6 @@
Loop(BasicBlock *BB) : ParentLoop(0) {
Blocks.push_back(BB); LoopDepth = 0;
}
- ~Loop() {
- for (unsigned i = 0, e = SubLoops.size(); i != e; ++i)
- delete SubLoops[i];
- }
-
void setLoopDepth(unsigned Level) {
LoopDepth = Level;
for (unsigned i = 0, e = SubLoops.size(); i != e; ++i)
@@ -261,6 +260,11 @@
/// getAnalysisUsage - Requires dominator sets
///
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+
+ /// removeLoop - This removes the specified top-level loop from this loop info
+ /// object. The loop is not deleted, as it will presumably be inserted into
+ /// another loop.
+ Loop *removeLoop(iterator I);
/// changeLoopFor - Change the top-level loop that contains BB to the
/// specified loop. This should be used by transformations that restructure
More information about the llvm-commits
mailing list