Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
[oota-llvm.git] / include / llvm / Analysis / LoopInfo.h
index 839b47ca2972d22da89990136729d383d4ee0bbe..17363df3957c4b9232063afefba87ef3fef1cb1b 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace llvm {
 
-struct DominatorSet;
+struct ETForest;
 class LoopInfo;
 class PHINode;
 class Instruction;
@@ -146,6 +146,9 @@ public:
   /// this returns null.
   ///
   Value *getTripCount() const;
+  
+  /// isLCSSAForm - Return true if the Loop is in LCSSA form
+  bool isLCSSAForm() const;
 
   //===--------------------------------------------------------------------===//
   // APIs for updating loop information after changing the CFG
@@ -267,8 +270,6 @@ public:
   virtual void releaseMemory();
   void print(std::ostream &O, const Module* = 0) const;
 
-  /// getAnalysisUsage - Requires dominator sets
-  ///
   virtual void getAnalysisUsage(AnalysisUsage &AU) const;
 
   /// removeLoop - This removes the specified top-level loop from this loop info
@@ -297,19 +298,14 @@ public:
   /// BasicBlocks to loops.
   void removeBlock(BasicBlock *BB);
 
-  static void stub();  // Noop
 private:
-  void Calculate(const DominatorSet &DS);
-  Loop *ConsiderForLoop(BasicBlock *BB, const DominatorSet &DS);
+  void Calculate(ETForest &EF);
+  Loop *ConsiderForLoop(BasicBlock *BB, ETForest &EF);
   void MoveSiblingLoopInto(Loop *NewChild, Loop *NewParent);
   void InsertLoopInto(Loop *L, Loop *Parent);
 };
 
 
-// Make sure that any clients of this file link in LoopInfo.cpp
-static IncludeFile
-LOOP_INFO_INCLUDE_FILE((void*)(&LoopInfo::stub));
-
 // Allow clients to walk the list of nested loops...
 template <> struct GraphTraits<const Loop*> {
   typedef const Loop NodeType;
@@ -339,4 +335,7 @@ template <> struct GraphTraits<Loop*> {
 
 } // End llvm namespace
 
+// Make sure that any clients of this file link in LoopInfo.cpp
+FORCE_DEFINING_FILE_TO_BE_LINKED(LoopInfo)
+
 #endif