mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062648 - Treat scripts which have been ion compiled or inlined before as hot enough to inline, r=h4writer.
This commit is contained in:
parent
6d019f1031
commit
f37902dac0
@ -891,6 +891,10 @@ jit::FinishDiscardBaselineScript(FreeOp *fop, JSScript *script)
|
||||
// Reset |active| flag so that we don't need a separate script
|
||||
// iteration to unmark them.
|
||||
script->baselineScript()->resetActive();
|
||||
|
||||
// The baseline caches have been wiped out, so the script will need to
|
||||
// warm back up before it can be inlined during Ion compilation.
|
||||
script->baselineScript()->clearIonCompiledOrInlined();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,12 @@ struct BaselineScript
|
||||
|
||||
// Flag set when compiled for use for debug mode. Handles various
|
||||
// Debugger hooks and compiles toggled calls for traps.
|
||||
DEBUG_MODE = 1 << 3
|
||||
DEBUG_MODE = 1 << 3,
|
||||
|
||||
// Flag set if this script has ever been Ion compiled, either directly
|
||||
// or inlined into another script. This is cleared when the script's
|
||||
// type information or caches are cleared.
|
||||
ION_COMPILED_OR_INLINED = 1 << 4
|
||||
};
|
||||
|
||||
private:
|
||||
@ -229,6 +234,16 @@ struct BaselineScript
|
||||
return flags_ & DEBUG_MODE;
|
||||
}
|
||||
|
||||
void setIonCompiledOrInlined() {
|
||||
flags_ |= ION_COMPILED_OR_INLINED;
|
||||
}
|
||||
void clearIonCompiledOrInlined() {
|
||||
flags_ &= ~ION_COMPILED_OR_INLINED;
|
||||
}
|
||||
bool ionCompiledOrInlined() const {
|
||||
return flags_ & ION_COMPILED_OR_INLINED;
|
||||
}
|
||||
|
||||
uint32_t prologueOffset() const {
|
||||
return prologueOffset_;
|
||||
}
|
||||
|
@ -148,6 +148,9 @@ IonBuilder::IonBuilder(JSContext *analysisContext, CompileCompartment *comp,
|
||||
|
||||
JS_ASSERT(script()->hasBaselineScript() == (info->executionMode() != ArgumentsUsageAnalysis));
|
||||
JS_ASSERT(!!analysisContext == (info->executionMode() == DefinitePropertiesAnalysis));
|
||||
|
||||
if (!info->executionModeIsAnalysis())
|
||||
script()->baselineScript()->setIonCompiledOrInlined();
|
||||
}
|
||||
|
||||
void
|
||||
@ -4202,6 +4205,7 @@ IonBuilder::makeInliningDecision(JSFunction *target, CallInfo &callInfo)
|
||||
// type information, except for definite properties analysis,
|
||||
// as the caller has not run yet.
|
||||
if (targetScript->getUseCount() < optimizationInfo().usesBeforeInlining() &&
|
||||
!targetScript->baselineScript()->ionCompiledOrInlined() &&
|
||||
info().executionMode() != DefinitePropertiesAnalysis)
|
||||
{
|
||||
return DontInline(targetScript, "Vetoed: callee is insufficiently hot.");
|
||||
|
Loading…
Reference in New Issue
Block a user