[llvm] r278980 - TailDuplicator: Use optForSize instead of hasFnAttribute.

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 14:07:34 PDT 2016


Author: iteratee
Date: Wed Aug 17 16:07:33 2016
New Revision: 278980

URL: http://llvm.org/viewvc/llvm-project?rev=278980&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/TailDuplicator.cpp

Modified: llvm/trunk/lib/CodeGen/TailDuplicator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplicator.cpp?rev=278980&r1=278979&r2=278980&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplicator.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplicator.cpp Wed Aug 17 16:07:33 2016
@@ -513,7 +513,7 @@ bool TailDuplicator::shouldTailDuplicate
   unsigned MaxDuplicateCount;
   if (TailDuplicateSize.getNumOccurrences() == 0 &&
       // FIXME: Use Function::optForSize().
-      MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
+      MF.getFunction()->optForSize())
     MaxDuplicateCount = 1;
   else
     MaxDuplicateCount = TailDuplicateSize;




More information about the llvm-commits mailing list