[llvm-commits] [llvm] r165606 - /llvm/trunk/lib/CodeGen/TargetSchedule.cpp

Andrew Trick atrick at apple.com
Tue Oct 9 22:43:18 PDT 2012


Author: atrick
Date: Wed Oct 10 00:43:18 2012
New Revision: 165606

URL: http://llvm.org/viewvc/llvm-project?rev=165606&view=rev
Log:
misched: fall-back to a target hook for instr bundles.

Modified:
    llvm/trunk/lib/CodeGen/TargetSchedule.cpp

Modified: llvm/trunk/lib/CodeGen/TargetSchedule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetSchedule.cpp?rev=165606&r1=165605&r2=165606&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetSchedule.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetSchedule.cpp Wed Oct 10 00:43:18 2012
@@ -203,10 +203,11 @@
 }
 
 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);





More information about the llvm-commits mailing list