Changes in directory llvm/lib/Analysis:
LoopPass.cpp updated: 1.10 -> 1.11 --- Log message: LPPassManager : Add initialization and finalizatino hooks. --- Diffs of the changes: (+20 -0) LoopPass.cpp | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+) Index: llvm/lib/Analysis/LoopPass.cpp diff -u llvm/lib/Analysis/LoopPass.cpp:1.10 llvm/lib/Analysis/LoopPass.cpp:1.11 --- llvm/lib/Analysis/LoopPass.cpp:1.10 Mon Mar 5 20:30:46 2007 +++ llvm/lib/Analysis/LoopPass.cpp Tue Mar 6 10:59:03 2007 @@ -57,6 +57,18 @@ for (LoopInfo::iterator I = LI.begin(), E = LI.end(); I != E; ++I) addLoopIntoQueue(*I, LQ); + // Initialization + for (std::deque<Loop *>::const_iterator I = LQ.begin(), E = LQ.end(); + I != E; ++I) { + Loop *L = *I; + for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { + Pass *P = getContainedPass(Index); + LoopPass *LP = dynamic_cast<LoopPass *>(P); + if (LP) + Changed |= LP->doInitialization(L, *this); + } + } + // Walk Loops while (!LQ.empty()) { @@ -101,6 +113,14 @@ if (redoThisLoop) LQ.push_back(L); } + + // Finalization + for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { + Pass *P = getContainedPass(Index); + LoopPass *LP = dynamic_cast <LoopPass *>(P); + if (LP) + Changed |= LP->doFinalization(); + } return Changed; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits