diff options
author | Devang Patel <dpatel@apple.com> | 2006-12-07 20:51:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-12-07 20:51:18 +0000 |
commit | 3e44559d0137f2c3e3bf7a0c1e0004e0a5c81137 (patch) | |
tree | 732ad25984cb61fa73617a961f7f4f5262ed464e | |
parent | bcd2498f4f1682dbdc41452add5b9bc72cbd6b3f (diff) | |
download | external_llvm-3e44559d0137f2c3e3bf7a0c1e0004e0a5c81137.zip external_llvm-3e44559d0137f2c3e3bf7a0c1e0004e0a5c81137.tar.gz external_llvm-3e44559d0137f2c3e3bf7a0c1e0004e0a5c81137.tar.bz2 |
Add ImmutablePass into the list of info managed by top level pass
manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32322 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/PassManager.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 77820ad..1809432 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -122,6 +122,16 @@ public: PassManagers.clear(); } + /// Add immutable pass and initialize it. + inline void addImmutablePass(ImmutablePass *P) { + P->initializePass(); + ImmutablePasses.push_back(P); + } + + inline std::vector<ImmutablePass *>& getImmutablePasses() { + return ImmutablePasses; + } + private: /// Collection of pass managers @@ -130,6 +140,9 @@ private: // Map to keep track of last user of the analysis pass. // LastUser->second is the last user of Lastuser->first. std::map<Pass *, Pass *> LastUser; + + /// Immutable passes are managed by top level manager. + std::vector<ImmutablePass *> ImmutablePasses; }; /// Set pass P as the last user of the given analysis passes. |