misched: allow NULL InstrItineraries.
authorAndrew Trick <atrick@apple.com>
Mon, 2 Jul 2012 21:55:12 +0000 (21:55 +0000)
committerAndrew Trick <atrick@apple.com>
Mon, 2 Jul 2012 21:55:12 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159599 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineScheduler.cpp

index 18e61e0a78e3491121c6179840114d2d7105e6d4..847bf1e76e3f21ec9ff45ace2cacb7f3755628fb 100644 (file)
@@ -408,6 +408,7 @@ public:
 
   /// getNumMicroOps - Return the number of issue slots required for this MI.
   unsigned getNumMicroOps(MachineInstr *MI) const {
+    if (!InstrItins) return 1;
     int UOps = InstrItins->getNumMicroOps(MI->getDesc().getSchedClass());
     return (UOps >= 0) ? UOps : TII->getNumMicroOps(InstrItins, MI);
   }