diff options
author | Andrew Trick <atrick@apple.com> | 2013-04-13 06:07:45 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-04-13 06:07:45 +0000 |
commit | be2bccbce9353abb4e3d161d07718dc28b389cd1 (patch) | |
tree | 556da8bc8c9ac8b74e802c4a1071cbea800d2da3 /llvm/lib/CodeGen/TargetSchedule.cpp | |
parent | f7fd6b9e3a011638adadeca9cda25d9cfc0ff271 (diff) | |
download | bcm5719-llvm-be2bccbce9353abb4e3d161d07718dc28b389cd1.tar.gz bcm5719-llvm-be2bccbce9353abb4e3d161d07718dc28b389cd1.zip |
MI-Sched cleanup. If an instruction has no valid sched class, do not attempt to check for a variant.
llvm-svn: 179451
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetSchedule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp index 783bfa1c1a1..1bf14dbcef2 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; |