summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-04-08 07:10:30 +0000
committerDaniel Jasper <djasper@google.com>2015-04-08 07:10:30 +0000
commit018070c4c1a85c6f128d3f5ec31114e45f7726dc (patch)
tree20dd2b2511b02257037bf184ec0f73df4f8737fe /llvm/lib/CodeGen
parent5e593a40faa5e2eb44d029fdfcd133cce4ee778f (diff)
downloadbcm5719-llvm-018070c4c1a85c6f128d3f5ec31114e45f7726dc.tar.gz
bcm5719-llvm-018070c4c1a85c6f128d3f5ec31114e45f7726dc.zip
[MachineLICM] Cleanup, remove unused parameters. NFC.
llvm-svn: 234392
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 4ca618af358..f3b37a791d5 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];
OpenPOWER on IntegriCloud