* Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
index f10bf3c..adc8903 100644
--- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -1480,26 +1480,23 @@
//---------------------------------------------------------------------------
namespace {
- class InstructionSchedulingWithSSA : public MethodPass {
+ class InstructionSchedulingWithSSA : public FunctionPass {
const TargetMachine ⌖
public:
inline InstructionSchedulingWithSSA(const TargetMachine &T) : target(T) {}
- // getAnalysisUsageInfo - We use LiveVarInfo...
- virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Requires,
- Pass::AnalysisSet &Destroyed,
- Pass::AnalysisSet &Provided) {
- Requires.push_back(MethodLiveVarInfo::ID);
- Destroyed.push_back(MethodLiveVarInfo::ID);
+ // getAnalysisUsage - We use LiveVarInfo...
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.addRequired(MethodLiveVarInfo::ID);
}
- bool runOnMethod(Function *F);
+ bool runOnFunction(Function *F);
};
} // end anonymous namespace
bool
-InstructionSchedulingWithSSA::runOnMethod(Function *M)
+InstructionSchedulingWithSSA::runOnFunction(Function *M)
{
if (SchedDebugLevel == Sched_Disable)
return false;
@@ -1544,8 +1541,6 @@
}
-MethodPass*
-createInstructionSchedulingWithSSAPass(const TargetMachine &tgt)
-{
+Pass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) {
return new InstructionSchedulingWithSSA(tgt);
}