Commit b06fa137 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[interpreter] Be explicit when to test BytecodeGraphBuilder.

This adds a dedicated flag for enabling the BytecodeGraphBuilder. The
intention is to be explicit when this variant is being tested and to
avoid unnecessary overhead in production code for a configuration that
is not yet shipping.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/1925123002
Cr-Commit-Position: refs/heads/master@{#35892}
parent 49a4f2d1
...@@ -839,7 +839,8 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, ...@@ -839,7 +839,8 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
: new HCompilationJob(info.get())); : new HCompilationJob(info.get()));
// TruboFan can optimize directly from existing bytecode. // TruboFan can optimize directly from existing bytecode.
if (use_turbofan && info->shared_info()->HasBytecodeArray()) { if (FLAG_turbo_from_bytecode && use_turbofan &&
info->shared_info()->HasBytecodeArray()) {
info->MarkAsOptimizeFromBytecode(); info->MarkAsOptimizeFromBytecode();
} }
......
...@@ -409,6 +409,7 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true, ...@@ -409,6 +409,7 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
DEFINE_BOOL(turbo, false, "enable TurboFan compiler") DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization) DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization)
DEFINE_BOOL(turbo_shipping, true, "enable TurboFan compiler on subset") DEFINE_BOOL(turbo_shipping, true, "enable TurboFan compiler on subset")
DEFINE_BOOL(turbo_from_bytecode, false, "enable building graphs from bytecode")
DEFINE_BOOL(turbo_greedy_regalloc, false, "use the greedy register allocator") DEFINE_BOOL(turbo_greedy_regalloc, false, "use the greedy register allocator")
DEFINE_BOOL(turbo_sp_frame_access, false, DEFINE_BOOL(turbo_sp_frame_access, false,
"use stack pointer-relative access to frame wherever possible") "use stack pointer-relative access to frame wherever possible")
......
...@@ -188,7 +188,7 @@ class FunctionTester : public InitializedHandleScope { ...@@ -188,7 +188,7 @@ class FunctionTester : public InitializedHandleScope {
if (flags_ & CompilationInfo::kInliningEnabled) { if (flags_ & CompilationInfo::kInliningEnabled) {
info.MarkAsInliningEnabled(); info.MarkAsInliningEnabled();
} }
if (function->shared()->HasBytecodeArray()) { if (FLAG_turbo_from_bytecode && function->shared()->HasBytecodeArray()) {
info.MarkAsOptimizeFromBytecode(); info.MarkAsOptimizeFromBytecode();
} else { } else {
CHECK(Compiler::Analyze(info.parse_info())); CHECK(Compiler::Analyze(info.parse_info()));
......
...@@ -152,6 +152,9 @@ ...@@ -152,6 +152,9 @@
# TODO(turbofan): The escape analysis needs some investigation. # TODO(turbofan): The escape analysis needs some investigation.
'compiler/escape-analysis-*': [PASS, NO_VARIANTS], 'compiler/escape-analysis-*': [PASS, NO_VARIANTS],
# TODO(mstarzinger): Fails in --turbo --always-opt mode.
'ignition/ignition-statistics-extension': [PASS, NO_VARIANTS],
############################################################################## ##############################################################################
# Too slow in debug mode with --stress-opt mode. # Too slow in debug mode with --stress-opt mode.
'compiler/regress-stacktrace-methods': [PASS, ['mode == debug', SKIP]], 'compiler/regress-stacktrace-methods': [PASS, ['mode == debug', SKIP]],
......
...@@ -42,7 +42,7 @@ ALL_VARIANT_FLAGS = { ...@@ -42,7 +42,7 @@ ALL_VARIANT_FLAGS = {
"turbofan_opt": [["--turbo", "--always-opt"]], "turbofan_opt": [["--turbo", "--always-opt"]],
"nocrankshaft": [["--nocrankshaft"]], "nocrankshaft": [["--nocrankshaft"]],
"ignition": [["--ignition", "--turbo"]], "ignition": [["--ignition", "--turbo"]],
"ignition_turbofan": [["--ignition", "--turbo"]], "ignition_turbofan": [["--ignition", "--turbo", "--turbo-from-bytecode"]],
"preparser": [["--min-preparse-length=0"]], "preparser": [["--min-preparse-length=0"]],
} }
...@@ -53,7 +53,7 @@ FAST_VARIANT_FLAGS = { ...@@ -53,7 +53,7 @@ FAST_VARIANT_FLAGS = {
"turbofan": [["--turbo"]], "turbofan": [["--turbo"]],
"nocrankshaft": [["--nocrankshaft"]], "nocrankshaft": [["--nocrankshaft"]],
"ignition": [["--ignition", "--turbo"]], "ignition": [["--ignition", "--turbo"]],
"ignition_turbofan": [["--ignition", "--turbo"]], "ignition_turbofan": [["--ignition", "--turbo", "--turbo-from-bytecode"]],
"preparser": [["--min-preparse-length=0"]], "preparser": [["--min-preparse-length=0"]],
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment