From 2899e126612656c8045d695f9857f194bababee1 Mon Sep 17 00:00:00 2001 From: Hannes Verschore Date: Sun, 24 Nov 2013 20:59:06 +0100 Subject: [PATCH] Bug 942105 - IonMonkey: Remove the inlineUseCountRatio option, r=jandem --- js/src/jit/Ion.h | 7 ------- js/src/jit/IonBuilder.cpp | 19 +++++-------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h index cb68dc7db088..3b57f07b1059 100644 --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -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) diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 335b5d73a576..8cb5c3f5f78b 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -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; }