[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h

Chris Lattner lattner at cs.uiuc.edu
Sat Aug 16 15:58:10 PDT 2003


Changes in directory llvm/include/llvm/Analysis:

LoopInfo.h updated: 1.25 -> 1.26

---
Log message:

Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll


---
Diffs of the changes:

Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.25 llvm/include/llvm/Analysis/LoopInfo.h:1.26
--- llvm/include/llvm/Analysis/LoopInfo.h:1.25	Fri Feb 28 10:54:37 2003
+++ llvm/include/llvm/Analysis/LoopInfo.h	Sat Aug 16 15:57:13 2003
@@ -32,17 +32,17 @@
 class Loop {
   Loop *ParentLoop;
   std::vector<Loop*> SubLoops;       // Loops contained entirely within this one
-  std::vector<BasicBlock *> Blocks;  // First entry is the header node
-  std::vector<BasicBlock *> ExitBlocks; // Reachable blocks outside the loop
+  std::vector<BasicBlock*> Blocks;   // First entry is the header node
+  std::vector<BasicBlock*> ExitBlocks; // Reachable blocks outside the loop
   unsigned LoopDepth;                // Nesting depth of this loop
 
   Loop(const Loop &);                  // DO NOT IMPLEMENT
   const Loop &operator=(const Loop &); // DO NOT IMPLEMENT
 public:
 
-  inline unsigned getLoopDepth() const { return LoopDepth; }
-  inline BasicBlock *getHeader() const { return Blocks.front(); }
-  inline Loop *getParentLoop() const { return ParentLoop; }
+  unsigned getLoopDepth() const { return LoopDepth; }
+  BasicBlock *getHeader() const { return Blocks.front(); }
+  Loop *getParentLoop() const { return ParentLoop; }
 
   /// contains - Return true of the specified basic block is in this loop
   bool contains(const BasicBlock *BB) const;
@@ -105,7 +105,7 @@
   ///
   void changeExitBlock(BasicBlock *Old, BasicBlock *New);
 
-  void print(std::ostream &O) const;
+  void print(std::ostream &O, unsigned Depth = 0) const;
   void dump() const;
 private:
   friend class LoopInfo;
@@ -181,6 +181,8 @@
 private:
   void Calculate(const DominatorSet &DS);
   Loop *ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS);
+  void MoveSiblingLoopInto(Loop *NewChild, Loop *NewParent);
+  void InsertLoopInto(Loop *L, Loop *Parent);
 };
 
 





More information about the llvm-commits mailing list