зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1314172 - Add an option to toggle backtracking on inlining failures. r=h4writer
This commit is contained in:
Родитель
1649ee9037
Коммит
d981a267d6
|
@ -30,6 +30,7 @@ enum MethodStatus
|
|||
|
||||
enum AbortReason {
|
||||
AbortReason_Alloc,
|
||||
AbortReason_Inlining,
|
||||
AbortReason_PreliminaryObjects,
|
||||
AbortReason_Disable,
|
||||
AbortReason_Error,
|
||||
|
|
|
@ -5256,8 +5256,13 @@ IonBuilder::inlineScriptedCall(CallInfo& callInfo, JSFunction* target)
|
|||
// the inlining was aborted for a non-exception reason.
|
||||
if (inlineBuilder.abortReason_ == AbortReason_Disable) {
|
||||
calleeScript->setUninlineable();
|
||||
current = backup.restore();
|
||||
return InliningStatus_NotInlined;
|
||||
if (!JitOptions.disableInlineBacktracking) {
|
||||
current = backup.restore();
|
||||
return InliningStatus_NotInlined;
|
||||
}
|
||||
abortReason_ = AbortReason_Inlining;
|
||||
} else if (inlineBuilder.abortReason_ == AbortReason_Inlining) {
|
||||
abortReason_ = AbortReason_Inlining;
|
||||
} else if (inlineBuilder.abortReason_ == AbortReason_Alloc) {
|
||||
abortReason_ = AbortReason_Alloc;
|
||||
} else if (inlineBuilder.abortReason_ == AbortReason_PreliminaryObjects) {
|
||||
|
@ -5286,8 +5291,12 @@ IonBuilder::inlineScriptedCall(CallInfo& callInfo, JSFunction* target)
|
|||
if (returns.empty()) {
|
||||
// Inlining of functions that have no exit is not supported.
|
||||
calleeScript->setUninlineable();
|
||||
current = backup.restore();
|
||||
return InliningStatus_NotInlined;
|
||||
if (!JitOptions.disableInlineBacktracking) {
|
||||
current = backup.restore();
|
||||
return InliningStatus_NotInlined;
|
||||
}
|
||||
abortReason_ = AbortReason_Inlining;
|
||||
return InliningStatus_Error;
|
||||
}
|
||||
MDefinition* retvalDefn = patchInlinedReturns(callInfo, returns, returnBlock);
|
||||
if (!retvalDefn)
|
||||
|
|
|
@ -75,6 +75,9 @@ DefaultJitOptions::DefaultJitOptions()
|
|||
// RangeAnalysis results.
|
||||
SET_DEFAULT(checkRangeAnalysis, false);
|
||||
|
||||
// Toggles whether IonBuilder fallbacks to a call if we fail to inline.
|
||||
SET_DEFAULT(disableInlineBacktracking, true);
|
||||
|
||||
// Toggles whether Alignment Mask Analysis is globally disabled.
|
||||
SET_DEFAULT(disableAma, false);
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ struct DefaultJitOptions
|
|||
#endif
|
||||
bool checkRangeAnalysis;
|
||||
bool runExtraChecks;
|
||||
bool disableInlineBacktracking;
|
||||
bool disableAma;
|
||||
bool disableEaa;
|
||||
bool disableEagerSimdUnbox;
|
||||
|
|
Загрузка…
Ссылка в новой задаче