aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 6f220f8604..8726ed43e3 100644
--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -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);
}
};
}