misched: allow NULL InstrItineraries.

llvm-svn: 159599
This commit is contained in:
Andrew Trick 2012-07-02 21:55:12 +00:00
parent dc2e4bcad3
commit 2f26b34806
1 changed files with 1 additions and 0 deletions

View File

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