/// \returns true when new instruction sequence should be generated
/// independent if it lengthens critical path or not
bool MachineCombiner::doSubstitute(unsigned NewSize, unsigned OldSize) {
- if (OptSize) // First of all check OptSize option
- return (NewSize < OldSize); // Only substitute if new size < old size
+ if (OptSize && (NewSize < OldSize))
+ return true;
if (!TSchedModel.hasInstrSchedModelOrItineraries())
return true;
return false;
// Eagerly stop after the first pattern fires.
Changed = true;
break;
- } else if (!OptSize || (NewInstCount <= OldInstCount)) {
+ } else {
// For big basic blocks, we only compute the full trace the first time
// we hit this. We do not invalidate the trace, but instead update the
// instruction depths incrementally.