diff options
author | Andrew Trick <atrick@apple.com> | 2012-08-08 02:44:11 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-08-08 02:44:11 +0000 |
commit | db9b1b5e66646f8fe03a98e800c73666f0008257 (patch) | |
tree | 6b5d5eadd292286af4869b57b34a2a161e2b8acc /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | |
parent | 207c569cf3e8fc02af64f13943beb243f4b32a6a (diff) | |
download | bcm5719-llvm-db9b1b5e66646f8fe03a98e800c73666f0008257.tar.gz bcm5719-llvm-db9b1b5e66646f8fe03a98e800c73666f0008257.zip |
Minor cleanup of defaultDefLatency API
llvm-svn: 161470
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp index a3d677110e2..ddee6b24016 100644 --- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp @@ -570,12 +570,12 @@ TargetInstrInfoImpl::getNumMicroOps(const InstrItineraryData *ItinData, } /// Return the default expected latency for a def based on it's opcode. -unsigned TargetInstrInfo::defaultDefLatency(const InstrItineraryData *ItinData, +unsigned TargetInstrInfo::defaultDefLatency(const MCSchedModel *SchedModel, const MachineInstr *DefMI) const { if (DefMI->mayLoad()) - return ItinData->SchedModel->LoadLatency; + return SchedModel->LoadLatency; if (isHighLatencyDef(DefMI->getOpcode())) - return ItinData->SchedModel->HighLatency; + return SchedModel->HighLatency; return 1; } @@ -638,7 +638,7 @@ static int computeDefOperandLatency( return 1; } else if(ItinData->isEmpty()) - return TII->defaultDefLatency(ItinData, DefMI); + return TII->defaultDefLatency(ItinData->SchedModel, DefMI); // ...operand lookup required return -1; @@ -669,7 +669,8 @@ computeOperandLatency(const InstrItineraryData *ItinData, // Expected latency is the max of the stage latency and itinerary props. if (!FindMin) - InstrLatency = std::max(InstrLatency, defaultDefLatency(ItinData, DefMI)); + InstrLatency = std::max(InstrLatency, + defaultDefLatency(ItinData->SchedModel, DefMI)); return InstrLatency; } @@ -742,6 +743,7 @@ computeOperandLatency(const InstrItineraryData *ItinData, // Expected latency is the max of the stage latency and itinerary props. if (!FindMin) - InstrLatency = std::max(InstrLatency, defaultDefLatency(ItinData, DefMI)); + InstrLatency = std::max(InstrLatency, + defaultDefLatency(ItinData->SchedModel, DefMI)); return InstrLatency; } |