[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Fri Dec 8 15:57:58 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.71 -> 1.72
---
Log message:
Do not drop ImmutablePasses on the floor.
---
Diffs of the changes: (+9 -7)
PassManager.cpp | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.71 llvm/lib/VMCore/PassManager.cpp:1.72
--- llvm/lib/VMCore/PassManager.cpp:1.71 Fri Dec 8 17:53:00 2006
+++ llvm/lib/VMCore/PassManager.cpp Fri Dec 8 17:57:43 2006
@@ -394,15 +394,16 @@
inline void addTopLevelPass(Pass *P) {
- if (dynamic_cast<ImmutablePass *> (P)) {
+ if (ImmutablePass *IP = dynamic_cast<ImmutablePass *> (P)) {
// P is a immutable pass then it will be managed by this
// top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR);
- }
-
- addPass(P);
+ addImmutablePass(IP);
+ }
+ else
+ addPass(P);
}
/// add - Add a pass to the queue of passes to run. This passes
@@ -498,15 +499,16 @@
inline void addTopLevelPass(Pass *P) {
- if (dynamic_cast<ImmutablePass *> (P)) {
+ if (ImmutablePass *IP = dynamic_cast<ImmutablePass *> (P)) {
// P is a immutable pass and it will be managed by this
// top level manager. Set up analysis resolver to connect them.
AnalysisResolver_New *AR = new AnalysisResolver_New(*this);
P->setResolver(AR);
+ addImmutablePass(IP);
}
-
- addPass(P);
+ else
+ addPass(P);
}
private:
More information about the llvm-commits
mailing list