Remove the redundant check against zero when updating ProcResourceCounters in
nextGroup(), as pointed out in https://reviews.llvm.org/D50187.
Review: Ulrich Weigand.
llvm-svn: 339139
// Decrease counters for execution units by one.
for (unsigned i = 0; i < SchedModel->getNumProcResourceKinds(); ++i)
- if (ProcResourceCounters[i] > 0)
- ProcResourceCounters[i] =
- ((ProcResourceCounters[i] > NumGroups) ?
- (ProcResourceCounters[i] - NumGroups) : 0);
+ ProcResourceCounters[i] = ((ProcResourceCounters[i] > NumGroups)
+ ? (ProcResourceCounters[i] - NumGroups)
+ : 0);
// Clear CriticalResourceIdx if it is now below the threshold.
if (CriticalResourceIdx != UINT_MAX &&