diff options
author | Andrew Trick <atrick@apple.com> | 2012-10-10 05:43:18 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-10-10 05:43:18 +0000 |
commit | c334bd45779afd39dbd7135d557d5f9e8835026b (patch) | |
tree | d653c369434ddb71bbf610d0a5e65d527481b57b /llvm/lib/CodeGen/TargetSchedule.cpp | |
parent | 2a06d4753ac7995ec9ff2f09bddf3072632eaf5d (diff) | |
download | bcm5719-llvm-c334bd45779afd39dbd7135d557d5f9e8835026b.tar.gz bcm5719-llvm-c334bd45779afd39dbd7135d557d5f9e8835026b.zip |
misched: fall-back to a target hook for instr bundles.
llvm-svn: 165606
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetSchedule.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); |