Allow -inline-threshold override default threshold even if compiling to optimize for size.

llvm-svn: 83274
This commit is contained in:
Evan Cheng 2009-10-04 06:13:54 +00:00
parent 1a5c370be3
commit eae1bb9779

View File

@ -192,6 +192,7 @@ bool Inliner::shouldInline(CallSite CS) {
Function *Fn = CS.getCaller();
if (Fn && !Fn->isDeclaration() &&
Fn->hasFnAttr(Attribute::OptimizeForSize) &&
InlineLimit.getNumOccurrences() == 0 &&
InlineThreshold != 50)
CurrentThreshold = 50;