Get rid of idefs for arguments
[oota-llvm.git] / lib / Analysis / IPA / CallGraphSCCPass.cpp
index 4f363dc1a0d72732a9a6747d3054c6588834dfd0..8eb1c120b0cc24523c6cf788da069d5a68f6a5e5 100644 (file)
@@ -1,4 +1,11 @@
 //===- CallGraphSCCPass.cpp - Pass that operates BU on call graph ---------===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This file implements the CallGraphSCCPass class, which is used for passes
 // which are implemented as bottom-up traversals on the call graph.  Because
@@ -10,7 +17,8 @@
 
 #include "llvm/CallGraphSCCPass.h"
 #include "llvm/Analysis/CallGraph.h"
-#include "Support/SCCIterator.h"
+#include "llvm/ADT/SCCIterator.h"
+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
@@ -20,11 +28,11 @@ void CallGraphSCCPass::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addPreserved<CallGraph>();
 }
 
-bool CallGraphSCCPass::run(Module &M) {
+bool CallGraphSCCPass::runOnModule(Module &M) {
   CallGraph &CG = getAnalysis<CallGraph>();
-  bool Changed = false;
+  bool Changed = doInitialization(CG);
   for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG);
        I != E; ++I)
     Changed = runOnSCC(*I);
-  return Changed;
+  return Changed | doFinalization(CG);
 }