mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +00:00
Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9cfb3adf44
commit
74733a7e46
@ -288,7 +288,17 @@ void AddOptimizationPasses(PassManager &MPM, FunctionPassManager &FPM,
|
|||||||
unsigned OptLevel) {
|
unsigned OptLevel) {
|
||||||
createStandardFunctionPasses(&FPM, OptLevel);
|
createStandardFunctionPasses(&FPM, OptLevel);
|
||||||
|
|
||||||
llvm::Pass *InliningPass = OptLevel > 1 ? createFunctionInliningPass() : 0;
|
llvm::Pass *InliningPass = 0;
|
||||||
|
if (DisableInline) {
|
||||||
|
// No inlining pass
|
||||||
|
} else if (OptLevel) {
|
||||||
|
unsigned Threshold = 200;
|
||||||
|
if (OptLevel > 2)
|
||||||
|
Threshold = 250;
|
||||||
|
InliningPass = createFunctionInliningPass(Threshold);
|
||||||
|
} else {
|
||||||
|
InliningPass = createAlwaysInlinerPass();
|
||||||
|
}
|
||||||
createStandardModulePasses(&MPM, OptLevel,
|
createStandardModulePasses(&MPM, OptLevel,
|
||||||
/*OptimizeSize=*/ false,
|
/*OptimizeSize=*/ false,
|
||||||
UnitAtATime,
|
UnitAtATime,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user