Commit 7854e649 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove --turbo-asm-deoptimization flag.

R=bmeurer@chromium.org,titzer@chromium.org

Review-Url: https://codereview.chromium.org/2557693006
Cr-Commit-Position: refs/heads/master@{#41579}
parent 9ca022fa
......@@ -575,7 +575,7 @@ PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl() {
}
}
if (info()->is_optimizing_from_bytecode() ||
!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) {
!info()->shared_info()->asm_function()) {
info()->MarkAsDeoptimizationEnabled();
if (FLAG_inline_accessors) {
info()->MarkAsAccessorInliningEnabled();
......
......@@ -24,8 +24,7 @@ FrameInspector::FrameInspector(StandardFrame* frame, int inlined_jsframe_index,
DCHECK(js_frame != nullptr);
// TODO(turbofan): Revisit once we support deoptimization.
if (js_frame->LookupCode()->is_turbofanned() &&
js_frame->function()->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization) {
js_frame->function()->shared()->asm_function()) {
is_optimized_ = false;
return;
}
......@@ -69,8 +68,7 @@ Handle<Object> FrameInspector::GetExpression(int index) {
// TODO(turbofan): Revisit once we support deoptimization.
if (frame_->is_java_script() &&
javascript_frame()->LookupCode()->is_turbofanned() &&
javascript_frame()->function()->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization) {
javascript_frame()->function()->shared()->asm_function()) {
return isolate_->factory()->undefined_value();
}
return is_optimized_ ? deoptimized_frame_->GetExpression(index)
......
......@@ -257,9 +257,8 @@ void Deoptimizer::DeoptimizeMarkedCodeForContext(Context* context) {
SafepointEntry safepoint = code->GetSafepointEntry(it.frame()->pc());
int deopt_index = safepoint.deoptimization_index();
// Turbofan deopt is checked when we are patching addresses on stack.
bool turbofanned = code->is_turbofanned() &&
function->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization;
bool turbofanned =
code->is_turbofanned() && function->shared()->asm_function();
bool safe_to_deopt =
deopt_index != Safepoint::kNoDeoptimizationIndex || turbofanned;
bool builtin = code->kind() == Code::BUILTIN;
......
......@@ -419,7 +419,6 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
// Flags for TurboFan.
DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization)
DEFINE_BOOL(turbo_sp_frame_access, false,
"use stack pointer-relative access to frame wherever possible")
DEFINE_BOOL(turbo_preprocess_ranges, true,
......@@ -439,8 +438,6 @@ DEFINE_BOOL(trace_turbo_jt, false, "trace TurboFan's jump threading")
DEFINE_BOOL(trace_turbo_ceq, false, "trace TurboFan's control equivalence")
DEFINE_BOOL(trace_turbo_loop, false, "trace TurboFan's loop optimizations")
DEFINE_BOOL(turbo_asm, true, "enable TurboFan for asm.js code")
DEFINE_BOOL(turbo_asm_deoptimization, false,
"enable deoptimization in TurboFan for asm.js code")
DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase")
DEFINE_STRING(turbo_verify_machine_graph, nullptr,
"verify TurboFan machine graph before instruction selection")
......
......@@ -1112,8 +1112,7 @@ int JavaScriptFrame::ComputeParametersCount() const {
namespace {
bool CannotDeoptFromAsmCode(Code* code, JSFunction* function) {
return code->is_turbofanned() && function->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization;
return code->is_turbofanned() && function->shared()->asm_function();
}
} // namespace
......
......@@ -1342,7 +1342,6 @@ HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) {
}
if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) {
DCHECK(summary.function()->shared()->asm_function());
DCHECK(!FLAG_turbo_asm_deoptimization);
// asm code cannot contain try-catch.
continue;
}
......
......@@ -48,7 +48,7 @@ RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) {
// TODO(turbofan): Deoptimization is not supported yet.
if (function->code()->is_turbofanned() &&
function->shared()->asm_function() && !FLAG_turbo_asm_deoptimization) {
function->shared()->asm_function()) {
return isolate->heap()->undefined_value();
}
......@@ -74,7 +74,7 @@ RUNTIME_FUNCTION(Runtime_DeoptimizeNow) {
// TODO(turbofan): Deoptimization is not supported yet.
if (function->code()->is_turbofanned() &&
function->shared()->asm_function() && !FLAG_turbo_asm_deoptimization) {
function->shared()->asm_function()) {
return isolate->heap()->undefined_value();
}
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --turbo-asm --turbo-asm-deoptimization --allow-natives-syntax
function Module(heap) {
"use asm";
var a = new Uint8Array(heap);
function f() {
var x = a[0] | 0;
%DeoptimizeFunction(f);
return x;
}
return f;
}
assertEquals(0, Module(new ArrayBuffer(1))());
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