TailDuplicator: Use optForSize instead of hasFnAttribute.

This will cause minsize functions to have the same threshold as optsize
functions, but otherwise should have no effects.

llvm-svn: 278980
This commit is contained in:
Kyle Butt 2016-08-17 21:07:33 +00:00
parent 4178b0b611
commit feafec588f
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ bool TailDuplicator::shouldTailDuplicate(const MachineFunction &MF,
unsigned MaxDuplicateCount;
if (TailDuplicateSize.getNumOccurrences() == 0 &&
// FIXME: Use Function::optForSize().
MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
MF.getFunction()->optForSize())
MaxDuplicateCount = 1;
else
MaxDuplicateCount = TailDuplicateSize;