[MachineLICM] Cleanup, remove unused parameters. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Jasper 2015-04-08 07:10:30 +00:00
parent e32bb4cb81
commit 2c5bf601c3

View File

@ -251,12 +251,10 @@ namespace {
/// if there is little to no overhead moving instructions into loops. /// if there is little to no overhead moving instructions into loops.
void SinkIntoLoop(); void SinkIntoLoop();
/// getRegisterClassIDAndCost - For a given MI, register, and the operand /// getRegisterClassIDAndCost - For a given register return the ID and cost
/// index, return the ID and cost of its representative register class by /// of its representative register class by reference.
/// reference. void getRegisterClassIDAndCost(unsigned Reg, unsigned &RCId,
void getRegisterClassIDAndCost(const MachineInstr *MI, unsigned &RCCost) const;
unsigned Reg, unsigned OpIdx,
unsigned &RCId, unsigned &RCCost) const;
/// InitRegPressure - Find all virtual register references that are liveout /// InitRegPressure - Find all virtual register references that are liveout
/// of the preheader to initialize the starting "register pressure". Note /// of the preheader to initialize the starting "register pressure". Note
@ -844,12 +842,8 @@ static bool isOperandKill(const MachineOperand &MO, MachineRegisterInfo *MRI) {
return MO.isKill() || MRI->hasOneNonDBGUse(MO.getReg()); return MO.isKill() || MRI->hasOneNonDBGUse(MO.getReg());
} }
/// getRegisterClassIDAndCost - For a given MI, register, and the operand void MachineLICM::getRegisterClassIDAndCost(unsigned Reg, unsigned &RCId,
/// index, return the ID and cost of its representative register class. unsigned &RCCost) const {
void
MachineLICM::getRegisterClassIDAndCost(const MachineInstr *MI,
unsigned Reg, unsigned OpIdx,
unsigned &RCId, unsigned &RCCost) const {
const TargetRegisterClass *RC = MRI->getRegClass(Reg); const TargetRegisterClass *RC = MRI->getRegClass(Reg);
MVT VT = *RC->vt_begin(); MVT VT = *RC->vt_begin();
if (VT == MVT::Untyped) { if (VT == MVT::Untyped) {
@ -913,7 +907,7 @@ MachineLICM::calcRegisterCost(const MachineInstr *MI, bool ConsiderSeen,
// FIXME: It seems bad to use RegSeen only for some of these calculations. // FIXME: It seems bad to use RegSeen only for some of these calculations.
bool isNew = ConsiderSeen ? RegSeen.insert(Reg).second : false; bool isNew = ConsiderSeen ? RegSeen.insert(Reg).second : false;
unsigned RCId, RCCost; unsigned RCId, RCCost;
getRegisterClassIDAndCost(MI, Reg, i, RCId, RCCost); getRegisterClassIDAndCost(Reg, RCId, RCCost);
int PriorCost = 0; int PriorCost = 0;
if (Cost.find(RCId) != Cost.end()) if (Cost.find(RCId) != Cost.end())
PriorCost = Cost[RCId]; PriorCost = Cost[RCId];