[llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Apr 20 16:31:19 PDT 2004
Changes in directory llvm/lib/Analysis/IPA:
CallGraphSCCPass.cpp updated: 1.5 -> 1.6
---
Log message:
Add the ability for SCC passes to initialize and finalize themselves
---
Diffs of the changes: (+3 -6)
Index: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
diff -u llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.5 llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.6
--- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.5 Tue Nov 11 16:41:32 2003
+++ llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp Tue Apr 20 16:30:06 2004
@@ -18,8 +18,7 @@
#include "llvm/CallGraphSCCPass.h"
#include "llvm/Analysis/CallGraph.h"
#include "Support/SCCIterator.h"
-
-namespace llvm {
+using namespace llvm;
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
@@ -31,11 +30,9 @@
bool CallGraphSCCPass::run(Module &M) {
CallGraph &CG = getAnalysis<CallGraph>();
- bool Changed = false;
+ bool Changed = doInitialization(M);
for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG);
I != E; ++I)
Changed = runOnSCC(*I);
- return Changed;
+ return Changed | doFinalization(M);
}
-
-} // End llvm namespace
More information about the llvm-commits
mailing list