[llvm] r179451 - MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.

Andrew Trick atrick at apple.com
Fri Apr 12 23:07:46 PDT 2013


Author: atrick
Date: Sat Apr 13 01:07:45 2013
New Revision: 179451

URL: http://llvm.org/viewvc/llvm-project?rev=179451&view=rev
Log:
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.

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=179451&r1=179450&r2=179451&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetSchedule.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetSchedule.cpp Sat Apr 13 01:07:45 2013
@@ -128,6 +128,8 @@ resolveSchedClass(const MachineInstr *MI
   // Get the definition's scheduling class descriptor from this machine model.
   unsigned SchedClass = MI->getDesc().getSchedClass();
   const MCSchedClassDesc *SCDesc = SchedModel.getSchedClassDesc(SchedClass);
+  if (!SCDesc->isValid())
+    return SCDesc;
 
 #ifndef NDEBUG
   unsigned NIter = 0;





More information about the llvm-commits mailing list