Turn effective assert(0) into llvm_unreachable
authorMatthias Braun <matze@braunis.de>
Thu, 14 May 2015 18:33:29 +0000 (18:33 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 14 May 2015 18:33:29 +0000 (18:33 +0000)
llvm-svn: 237379

llvm/lib/CodeGen/TargetSchedule.cpp

index c3fdd73..299380d 100644 (file)
@@ -242,13 +242,11 @@ unsigned TargetSchedModel::computeInstrLatency(unsigned Opcode) const {
 
   unsigned SCIdx = TII->get(Opcode).getSchedClass();
   const MCSchedClassDesc *SCDesc = SchedModel.getSchedClassDesc(SCIdx);
-  unsigned Latency = 0;
 
   if (SCDesc->isValid() && !SCDesc->isVariant())
     return computeInstrLatency(*SCDesc);
 
-  assert(Latency && "No MI sched latency");
-  return 0;
+  llvm_unreachable("No MI sched latency");
 }
 
 unsigned