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
diff --git a/llvm/lib/CodeGen/TailDuplicator.cpp b/llvm/lib/CodeGen/TailDuplicator.cpp
index dd84cef..ec8e48d 100644
--- a/llvm/lib/CodeGen/TailDuplicator.cpp
+++ b/llvm/lib/CodeGen/TailDuplicator.cpp
@@ -513,7 +513,7 @@
unsigned MaxDuplicateCount;
if (TailDuplicateSize.getNumOccurrences() == 0 &&
// FIXME: Use Function::optForSize().
- MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
+ MF.getFunction()->optForSize())
MaxDuplicateCount = 1;
else
MaxDuplicateCount = TailDuplicateSize;