* Rename MethodPass class to FunctionPass
[oota-llvm.git] / lib / Transforms / Utils / PromoteMemoryToRegister.cpp
index 6f220f8604239af963c08035074d8421332f70c6..8726ed43e361609e77a5773eaa5646d87bc69730 100644 (file)
@@ -309,22 +309,20 @@ bool PromoteInstance::queuePhiNode(BasicBlock *bb, int i /*the alloca*/)
 
 
 namespace {
-  struct PromotePass : public MethodPass {
+  struct PromotePass : public FunctionPass {
 
-    // runOnMethod - To run this pass, first we calculate the alloca
+    // runOnFunction - To run this pass, first we calculate the alloca
     // instructions that are safe for promotion, then we promote each one.
     //
-    virtual bool runOnMethod(Function *F) {
+    virtual bool runOnFunction(Function *F) {
       return (bool)PromoteInstance(F, getAnalysis<DominanceFrontier>());
     }
     
 
-    // getAnalysisUsageInfo - We need dominance frontiers
+    // getAnalysisUsage - We need dominance frontiers
     //
-    virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Requires,
-                                     Pass::AnalysisSet &Destroyed,
-                                     Pass::AnalysisSet &Provided) {
-      Requires.push_back(DominanceFrontier::ID);
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AU.addRequired(DominanceFrontier::ID);
     }
   };
 }