mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 01:15:50 +08:00
[TargetSchedule] Minor refactor in computeInstrLatency. NFC
The intent of revision r300311 was to add a check for invalid scheduling class descriptors. However, it ended up adding a redundant call in a basic block that should not be reachable. llvm-svn: 327231
This commit is contained in:
@@ -274,14 +274,12 @@ unsigned TargetSchedModel::computeInstrLatency(unsigned Opcode) const {
|
||||
unsigned SCIdx = TII->get(Opcode).getSchedClass();
|
||||
const MCSchedClassDesc *SCDesc = SchedModel.getSchedClassDesc(SCIdx);
|
||||
|
||||
if (SCDesc->isValid() && !SCDesc->isVariant())
|
||||
if (!SCDesc->isValid())
|
||||
return 0;
|
||||
if (!SCDesc->isVariant())
|
||||
return computeInstrLatency(*SCDesc);
|
||||
|
||||
if (SCDesc->isValid()) {
|
||||
assert (!SCDesc->isVariant() && "No MI sched latency: SCDesc->isVariant()");
|
||||
return computeInstrLatency(*SCDesc);
|
||||
}
|
||||
return 0;
|
||||
llvm_unreachable("No MI sched latency");
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
||||
Reference in New Issue
Block a user