From 82d46aec62f127856f4bfeb30f80aa12dd74bae0 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 10 Oct 2012 05:43:18 +0000 Subject: [PATCH] misched: fall-back to a target hook for instr bundles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165606 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetSchedule.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/TargetSchedule.cpp b/lib/CodeGen/TargetSchedule.cpp index edf68157ea9..4e753c6ecb4 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);