FunctionPass *createMipsDelaySlotFillerPass(MipsTargetMachine &TM);
FunctionPass *createMipsHazardSchedule();
FunctionPass *createMipsLongBranchPass(MipsTargetMachine &TM);
- FunctionPass *createMipsConstantIslandPass(MipsTargetMachine &tm);
+ FunctionPass *createMipsConstantIslandPass();
} // end namespace llvm;
#endif
/// the branch fix up pass.
bool HasFarJump;
- const TargetMachine &TM;
- bool IsPIC;
const MipsSubtarget *STI;
const Mips16InstrInfo *TII;
MipsFunctionInfo *MFI;
public:
static char ID;
- MipsConstantIslands(TargetMachine &tm)
- : MachineFunctionPass(ID), TM(tm),
- IsPIC(TM.getRelocationModel() == Reloc::PIC_), STI(nullptr),
- MF(nullptr), MCP(nullptr), PrescannedForConstants(false) {}
+ MipsConstantIslands()
+ : MachineFunctionPass(ID), STI(nullptr), MF(nullptr), MCP(nullptr),
+ PrescannedForConstants(false) {}
const char *getPassName() const override {
return "Mips Constant Islands";
}
});
}
-/// createMipsLongBranchPass - Returns a pass that converts branches to long
-/// branches.
-FunctionPass *llvm::createMipsConstantIslandPass(MipsTargetMachine &tm) {
- return new MipsConstantIslands(tm);
+/// Returns a pass that converts branches to long branches.
+FunctionPass *llvm::createMipsConstantIslandPass() {
+ return new MipsConstantIslands();
}
bool MipsConstantIslands::runOnMachineFunction(MachineFunction &mf) {
addPass(createMipsDelaySlotFillerPass(TM));
addPass(createMipsHazardSchedule());
addPass(createMipsLongBranchPass(TM));
- addPass(createMipsConstantIslandPass(TM));
+ addPass(createMipsConstantIslandPass());
}