forked from OSchip/llvm-project
Increase inlining threshold at -O3, to match llvm-gcc.
llvm-svn: 90897
This commit is contained in:
parent
859c415567
commit
e07f152e6d
|
@ -331,8 +331,14 @@ void BackendConsumer::CreatePasses() {
|
|||
switch (Inlining) {
|
||||
case CodeGenOptions::NoInlining: break;
|
||||
case CodeGenOptions::NormalInlining: {
|
||||
// Inline small functions
|
||||
unsigned Threshold = (CodeGenOpts.OptimizeSize || OptLevel < 3) ? 50 : 200;
|
||||
// Set the inline threshold following llvm-gcc.
|
||||
//
|
||||
// FIXME: Derive these constants in a principled fashion.
|
||||
unsigned Threshold = 200;
|
||||
if (CodeGenOpts.OptimizeSize)
|
||||
Threshold = 50;
|
||||
else if (OptLevel > 2)
|
||||
Threshold = 250;
|
||||
InliningPass = createFunctionInliningPass(Threshold);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue