mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 782432 - Ion-compile small functions more aggressively. (r=dvander)
This commit is contained in:
parent
7ef28ac5ac
commit
9773cee987
@ -987,8 +987,13 @@ Compile(JSContext *cx, JSScript *script, JSFunction *fun, jsbytecode *osrPc, boo
|
||||
if (cx->methodJitEnabled) {
|
||||
// If JM is enabled we use getUseCount instead of incUseCount to avoid
|
||||
// bumping the use count twice.
|
||||
if (script->getUseCount() < js_IonOptions.usesBeforeCompile)
|
||||
return Method_Skipped;
|
||||
if (script->length < js_IonOptions.smallFunctionMaxBytecodeLength) {
|
||||
if (script->getUseCount() < js_IonOptions.smallFunctionUsesBeforeCompile)
|
||||
return Method_Skipped;
|
||||
} else {
|
||||
if (script->getUseCount() < js_IonOptions.usesBeforeCompile)
|
||||
return Method_Skipped;
|
||||
}
|
||||
} else {
|
||||
if (script->incUseCount() < js_IonOptions.usesBeforeCompileNoJaeger)
|
||||
return Method_Skipped;
|
||||
|
@ -104,6 +104,15 @@ struct IonOptions
|
||||
// Default: 100
|
||||
uint32 smallFunctionMaxBytecodeLength;
|
||||
|
||||
// The compile useCount for small functions.
|
||||
//
|
||||
// This value has been arrived at empirically.
|
||||
// We may want to revisit this tuning after other optimizations have
|
||||
// gone in.
|
||||
//
|
||||
// Default: usesBeforeCompile / 4
|
||||
uint32 smallFunctionUsesBeforeCompile;
|
||||
|
||||
// The inlining limit for small functions.
|
||||
//
|
||||
// This value has been arrived at empirically via benchmarking.
|
||||
@ -158,6 +167,7 @@ struct IonOptions
|
||||
maxStackArgs(4096),
|
||||
maxInlineDepth(3),
|
||||
smallFunctionMaxBytecodeLength(100),
|
||||
smallFunctionUsesBeforeCompile(usesBeforeCompile / 4),
|
||||
smallFunctionUsesBeforeInlining(usesBeforeInlining / 4),
|
||||
polyInlineMax(4),
|
||||
inlineMaxTotalBytecodeLength(800),
|
||||
|
Loading…
Reference in New Issue
Block a user