Bug 942105 - IonMonkey: Remove the inlineUseCountRatio option, r=jandem

This commit is contained in:
Hannes Verschore 2013-11-24 20:59:06 +01:00
parent 34b13d7ba2
commit 2899e12661
2 changed files with 5 additions and 21 deletions

View File

@ -188,12 +188,6 @@ struct IonOptions
// Default: 1000
uint32_t inlineMaxTotalBytecodeLength;
// Minimal ratio between the use counts of the caller and the callee to
// enable inlining of functions.
//
// Default: 128
uint32_t inlineUseCountRatio;
// Whether functions are compiled immediately.
//
// Default: false
@ -246,7 +240,6 @@ struct IonOptions
smallFunctionMaxBytecodeLength(100),
polyInlineMax(4),
inlineMaxTotalBytecodeLength(1000),
inlineUseCountRatio(128),
eagerCompilation(false),
usesBeforeCompilePar(1),
inliningMaxCallerBytecodeLength(10000)

View File

@ -4053,22 +4053,13 @@ IonBuilder::makeInliningDecision(JSFunction *target, CallInfo &callInfo)
return false;
}
// Caller must be... somewhat hot. Ignore use counts when inlining for
// the definite properties analysis, as the caller has not run yet.
uint32_t callerUses = script()->getUseCount();
if (callerUses < js_IonOptions.usesBeforeInlining() &&
// Callee must have been called a few times to have somewhat stable
// type information, except for definite properties analysis,
// as the caller has not run yet.
if (targetScript->getUseCount() < js_IonOptions.usesBeforeInlining() &&
info().executionMode() != DefinitePropertiesAnalysis)
{
IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: caller is insufficiently hot.",
targetScript->filename(), targetScript->lineno);
return false;
}
// Callee must be hot relative to the caller.
if (targetScript->getUseCount() * js_IonOptions.inlineUseCountRatio < callerUses &&
info().executionMode() != DefinitePropertiesAnalysis)
{
IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: callee is not hot.",
IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: callee is insufficiently hot.",
targetScript->filename(), targetScript->lineno);
return false;
}