[llvm] r234392 - [MachineLICM] Cleanup, remove unused parameters. NFC.
Daniel Jasper
djasper at google.com
Wed Apr 8 00:10:31 PDT 2015
Author: djasper
Date: Wed Apr 8 02:10:30 2015
New Revision: 234392
URL: http://llvm.org/viewvc/llvm-project?rev=234392&view=rev
Log:
[MachineLICM] Cleanup, remove unused parameters. NFC.
Modified:
llvm/trunk/lib/CodeGen/MachineLICM.cpp
Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=234392&r1=234391&r2=234392&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Apr 8 02:10:30 2015
@@ -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 MachineO
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 Mach
// 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];
More information about the llvm-commits
mailing list