// Check if we've past the maximum possible threshold so we don't spin in
// huge basic blocks that will never inline.
- if (Cost > Threshold && !ComputeFullInlineCost)
+ if (Cost >= Threshold && !ComputeFullInlineCost)
return false;
}
Cost += InlineConstants::ColdccPenalty;
// Check if we're done. This can happen due to bonuses and penalties.
- if (Cost > Threshold && !ComputeFullInlineCost)
+ if (Cost >= Threshold && !ComputeFullInlineCost)
return false;
if (F.empty())
for (unsigned Idx = 0; Idx != BBWorklist.size(); ++Idx) {
// Bail out the moment we cross the threshold. This means we'll under-count
// the cost, but only when undercounting doesn't matter.
- if (Cost > Threshold && !ComputeFullInlineCost)
+ if (Cost >= Threshold && !ComputeFullInlineCost)
break;
BasicBlock *BB = BBWorklist[Idx];