From a57faa40c218889fef31c80e1fa3926c339ee32d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 28 Jun 2016 14:26:39 +0000 Subject: [PATCH] Delete dead code. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274020 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/Mips.h | 2 +- lib/Target/Mips/MipsConstantIslandPass.cpp | 16 ++++++---------- lib/Target/Mips/MipsTargetMachine.cpp | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/Target/Mips/Mips.h b/lib/Target/Mips/Mips.h index 639e189dee6..d9faf3325ca 100644 --- a/lib/Target/Mips/Mips.h +++ b/lib/Target/Mips/Mips.h @@ -31,7 +31,7 @@ namespace llvm { FunctionPass *createMipsDelaySlotFillerPass(MipsTargetMachine &TM); FunctionPass *createMipsHazardSchedule(); FunctionPass *createMipsLongBranchPass(MipsTargetMachine &TM); - FunctionPass *createMipsConstantIslandPass(MipsTargetMachine &tm); + FunctionPass *createMipsConstantIslandPass(); } // end namespace llvm; #endif diff --git a/lib/Target/Mips/MipsConstantIslandPass.cpp b/lib/Target/Mips/MipsConstantIslandPass.cpp index 3b8d3a2ef7d..b58c886c7fc 100644 --- a/lib/Target/Mips/MipsConstantIslandPass.cpp +++ b/lib/Target/Mips/MipsConstantIslandPass.cpp @@ -332,8 +332,6 @@ namespace { /// the branch fix up pass. bool HasFarJump; - const TargetMachine &TM; - bool IsPIC; const MipsSubtarget *STI; const Mips16InstrInfo *TII; MipsFunctionInfo *MFI; @@ -354,10 +352,9 @@ namespace { 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"; @@ -432,10 +429,9 @@ void MipsConstantIslands::dumpBBs() { } }); } -/// 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) { diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 79b0b455ccd..8366129b205 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -270,5 +270,5 @@ void MipsPassConfig::addPreEmitPass() { addPass(createMipsDelaySlotFillerPass(TM)); addPass(createMipsHazardSchedule()); addPass(createMipsLongBranchPass(TM)); - addPass(createMipsConstantIslandPass(TM)); + addPass(createMipsConstantIslandPass()); } -- 2.11.0