From 018070c4c1a85c6f128d3f5ec31114e45f7726dc Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Wed, 8 Apr 2015 07:10:30 +0000 Subject: [PATCH] [MachineLICM] Cleanup, remove unused parameters. NFC. llvm-svn: 234392 --- llvm/lib/CodeGen/MachineLICM.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 4ca618a..f3b37a7 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -251,12 +251,10 @@ namespace { /// if there is little to no overhead moving instructions into loops. void SinkIntoLoop(); - /// getRegisterClassIDAndCost - For a given MI, register, and the operand - /// index, return the ID and cost of its representative register class by - /// reference. - void getRegisterClassIDAndCost(const MachineInstr *MI, - unsigned Reg, unsigned OpIdx, - unsigned &RCId, unsigned &RCCost) const; + /// getRegisterClassIDAndCost - For a given register return the ID and cost + /// of its representative register class by reference. + void getRegisterClassIDAndCost(unsigned Reg, unsigned &RCId, + unsigned &RCCost) const; /// InitRegPressure - Find all virtual register references that are liveout /// 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()); } -/// getRegisterClassIDAndCost - For a given MI, register, and the operand -/// index, return the ID and cost of its representative register class. -void -MachineLICM::getRegisterClassIDAndCost(const MachineInstr *MI, - unsigned Reg, unsigned OpIdx, - unsigned &RCId, unsigned &RCCost) const { +void MachineLICM::getRegisterClassIDAndCost(unsigned Reg, unsigned &RCId, + unsigned &RCCost) const { const TargetRegisterClass *RC = MRI->getRegClass(Reg); MVT VT = *RC->vt_begin(); 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. bool isNew = ConsiderSeen ? RegSeen.insert(Reg).second : false; unsigned RCId, RCCost; - getRegisterClassIDAndCost(MI, Reg, i, RCId, RCCost); + getRegisterClassIDAndCost(Reg, RCId, RCCost); int PriorCost = 0; if (Cost.find(RCId) != Cost.end()) PriorCost = Cost[RCId]; -- 2.7.4