aboutsummaryrefslogtreecommitdiff
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
commit82d46aec62f127856f4bfeb30f80aa12dd74bae0 (patch)
tree57f0cd450b466fad8fc44c823da3124572557ff5
parent85c7b6108f8c8cea77d0bce30343f736f6c15981 (diff)
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
-rw-r--r--lib/CodeGen/TargetSchedule.cpp7
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);