[turbofan] Fix turbofan-enabling conditions.
This restricts turbofan to turbofan-supported subset for the shipping configuration ("use asm" and features unsupported by Crankshaft). Without this, we compile with Turbofan even when there is try-catch-finally as long as the function is "use asm" or it contains a feature unsupported by crankshaft but supported by turbofan (e.g., 'with' statement). BUG= Review URL: https://codereview.chromium.org/1552233002 Cr-Commit-Position: refs/heads/master@{#33085}
This commit is contained in:
parent
82ca2a414d
commit
964964541d
@ -411,12 +411,29 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
||||
DCHECK(info()->shared_info()->has_deoptimization_support());
|
||||
DCHECK(!info()->is_first_compile());
|
||||
|
||||
// Check the enabling conditions for TurboFan.
|
||||
bool optimization_disabled = info()->shared_info()->optimization_disabled();
|
||||
bool dont_crankshaft = info()->shared_info()->dont_crankshaft();
|
||||
if (((FLAG_turbo_asm && info()->shared_info()->asm_function()) ||
|
||||
(dont_crankshaft && strcmp(FLAG_turbo_filter, "~~") == 0) ||
|
||||
info()->closure()->PassesFilter(FLAG_turbo_filter)) &&
|
||||
(FLAG_turbo_osr || !info()->is_osr())) {
|
||||
|
||||
// Check the enabling conditions for Turbofan.
|
||||
// 1. "use asm" code.
|
||||
bool is_turbofanable_asm = FLAG_turbo_asm &&
|
||||
info()->shared_info()->asm_function() &&
|
||||
!optimization_disabled;
|
||||
|
||||
// 2. Fallback for features unsupported by Crankshaft.
|
||||
bool is_unsupported_by_crankshaft_but_turbofanable =
|
||||
dont_crankshaft && strcmp(FLAG_turbo_filter, "~~") == 0 &&
|
||||
!optimization_disabled;
|
||||
|
||||
// 3. Explicitly enabled by the command-line filter.
|
||||
bool passes_turbo_filter = info()->closure()->PassesFilter(FLAG_turbo_filter);
|
||||
|
||||
// If this is OSR request, OSR must be enabled by Turbofan.
|
||||
bool passes_osr_test = FLAG_turbo_osr || !info()->is_osr();
|
||||
|
||||
if ((is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
|
||||
passes_turbo_filter) &&
|
||||
passes_osr_test) {
|
||||
// Use TurboFan for the compilation.
|
||||
if (FLAG_trace_opt) {
|
||||
OFStream os(stdout);
|
||||
|
@ -118,6 +118,9 @@
|
||||
'debug-listbreakpoints': [PASS, NO_VARIANTS], # arm64 nosnap with turbofan
|
||||
'debug-enable-disable-breakpoints': [PASS, NO_VARIANTS], #arm64 nosnap with turbofan.
|
||||
|
||||
# TODO(rossberg)
|
||||
'strong/literals': [SKIP], # Rest arguments do not respect strongness in Turbofan.
|
||||
|
||||
# Issue 4035: unexpected frame->context() in debugger
|
||||
'regress/regress-crbug-107996': [PASS, NO_VARIANTS],
|
||||
'regress/regress-crbug-171715': [PASS, NO_VARIANTS],
|
||||
@ -170,10 +173,6 @@
|
||||
'regress-sync-optimized-lists': [PASS, NO_VARIANTS],
|
||||
'regress/regress-store-uncacheable': [PASS, NO_VARIANTS],
|
||||
|
||||
# TODO(jarin): compiler.cc seems to ignore DisableOptimization for
|
||||
# TurboFan in various cases.
|
||||
'regress/regress-417709a': [SKIP],
|
||||
|
||||
# issue 4078:
|
||||
'allocation-site-info': [PASS, NO_VARIANTS],
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user