From: Andrew Trick Date: Sat, 13 Apr 2013 06:07:45 +0000 (+0000) Subject: MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be2bccbce9353abb4e3d161d07718dc28b389cd1;p=platform%2Fupstream%2Fllvm.git MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant. llvm-svn: 179451 --- diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp index 783bfa1..1bf14db 100644 --- a/llvm/lib/CodeGen/TargetSchedule.cpp +++ b/llvm/lib/CodeGen/TargetSchedule.cpp @@ -128,6 +128,8 @@ resolveSchedClass(const MachineInstr *MI) const { // 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;