Move the PMStack class out of Pass.h and into PassManagers.h.
authorDan Gohman <gohman@apple.com>
Fri, 14 Mar 2008 18:14:29 +0000 (18:14 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 14 Mar 2008 18:14:29 +0000 (18:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48367 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopPass.h
include/llvm/Pass.h
include/llvm/PassManagers.h

index 7ae7d3fc979c6de457fc7832339a567c5dbeb62c..3b5f565f533f50021b6592000b561a2ce9a39892 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
 
 class LPPassManager;
 class Function;
+class PMStack;
 
 class LoopPass : public Pass {
 
index 896839effc9ec6643d5ef7bcd63c73eca14413f5..8243d2aa25b1a746cd675e22b5f409579e3ace4e 100644 (file)
@@ -32,7 +32,6 @@
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Streams.h"
 #include <vector>
-#include <deque>
 #include <map>
 #include <iosfwd>
 #include <cassert>
@@ -369,33 +368,6 @@ public:
   }
 };
 
-/// PMStack
-/// Top level pass manager (see PassManager.cpp) maintains active Pass Managers 
-/// using PMStack. Each Pass implements assignPassManager() to connect itself
-/// with appropriate manager. assignPassManager() walks PMStack to find
-/// suitable manager.
-///
-/// PMStack is just a wrapper around standard deque that overrides pop() and
-/// push() methods.
-class PMStack {
-public:
-  typedef std::deque<PMDataManager *>::reverse_iterator iterator;
-  iterator begin() { return S.rbegin(); }
-  iterator end() { return S.rend(); }
-
-  void handleLastUserOverflow();
-
-  void pop();
-  inline PMDataManager *top() { return S.back(); }
-  void push(PMDataManager *PM);
-  inline bool empty() { return S.empty(); }
-
-  void dump();
-private:
-  std::deque<PMDataManager *> S;
-};
-
-
 /// If the user specifies the -time-passes argument on an LLVM tool command line
 /// then the value of this boolean will be true, otherwise false.
 /// @brief This is the storage for the -time-passes option.
index eaa6f442709d2e64f9627c494945ad6f9caca64f..1047e70cb7e250b239c9dde40e92ae21e98a490c 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "llvm/PassManager.h"
 #include "llvm/ADT/SmallVector.h"
+#include <deque>
 
 //===----------------------------------------------------------------------===//
 // Overview:
@@ -105,6 +106,36 @@ enum PassDebuggingString {
   ON_CG_MSG // "' on Call Graph ...\n'"
 };  
 
+//===----------------------------------------------------------------------===//
+// PMStack
+//
+/// PMStack
+/// Top level pass managers (see PassManager.cpp) maintain active Pass Managers 
+/// using PMStack. Each Pass implements assignPassManager() to connect itself
+/// with appropriate manager. assignPassManager() walks PMStack to find
+/// suitable manager.
+///
+/// PMStack is just a wrapper around standard deque that overrides pop() and
+/// push() methods.
+class PMStack {
+public:
+  typedef std::deque<PMDataManager *>::reverse_iterator iterator;
+  iterator begin() { return S.rbegin(); }
+  iterator end() { return S.rend(); }
+
+  void handleLastUserOverflow();
+
+  void pop();
+  inline PMDataManager *top() { return S.back(); }
+  void push(PMDataManager *PM);
+  inline bool empty() { return S.empty(); }
+
+  void dump();
+private:
+  std::deque<PMDataManager *> S;
+};
+
+
 //===----------------------------------------------------------------------===//
 // PMTopLevelManager
 //