From c334bd45779afd39dbd7135d557d5f9e8835026b Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 10 Oct 2012 05:43:18 +0000 Subject: misched: fall-back to a target hook for instr bundles. llvm-svn: 165606 --- llvm/lib/CodeGen/TargetSchedule.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp index edf68157ea9..4e753c6ecb4 100644 --- a/llvm/lib/CodeGen/TargetSchedule.cpp +++ b/llvm/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); -- cgit v1.2.3