diff options
Diffstat (limited to 'lib/CodeGen/TargetSchedule.cpp')
-rw-r--r-- | lib/CodeGen/TargetSchedule.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/TargetSchedule.cpp b/lib/CodeGen/TargetSchedule.cpp index edf68157ea..4e753c6ecb 100644 --- a/lib/CodeGen/TargetSchedule.cpp +++ b/lib/CodeGen/TargetSchedule.cpp @@ -203,10 +203,11 @@ unsigned TargetSchedModel::computeOperandLatency( } unsigned TargetSchedModel::computeInstrLatency(const MachineInstr *MI) const { - if (hasInstrItineraries()) { - // For the itinerary model, fall back to the old subtarget hook. + // For the itinerary model, fall back to the old subtarget hook. + // Allow subtargets to compute Bundle latencies outside the machine model. + if (hasInstrItineraries() || MI->isBundle()) return TII->getInstrLatency(&InstrItins, MI); - } + if (hasInstrSchedModel()) { unsigned Latency = 0; const MCSchedClassDesc *SCDesc = resolveSchedClass(MI); |