summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetSchedule.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-10-10 05:43:18 +0000
committerAndrew Trick <atrick@apple.com>2012-10-10 05:43:18 +0000
commitc334bd45779afd39dbd7135d557d5f9e8835026b (patch)
treed653c369434ddb71bbf610d0a5e65d527481b57b /llvm/lib/CodeGen/TargetSchedule.cpp
parent2a06d4753ac7995ec9ff2f09bddf3072632eaf5d (diff)
downloadbcm5719-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.cpp7
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);
OpenPOWER on IntegriCloud