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

[turbofan] Remove deprecated --turbo-from-bytecode flag.

This flag is on by default for now. Whenever heuristics in the compiler
pipeline decide to use Ignition+TurboFan, then {BytecodeGraphBuilder} is
active. Removing the flag reduces maintenance overhead.

R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2437103002
Cr-Commit-Position: refs/heads/master@{#40639}
parent feb96ace
......@@ -592,12 +592,7 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
}
if (IsGeneratorFunction(node->kind()) || IsAsyncFunction(node->kind())) {
// Generators can be optimized if --turbo-from-bytecode is set.
if (FLAG_turbo_from_bytecode) {
DisableCrankshaft(kGenerator);
} else {
DisableOptimization(kGenerator);
}
DisableCrankshaft(kGenerator);
}
if (IsClassConstructor(node->kind())) {
......
......@@ -619,9 +619,6 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
// Shared function no longer needs to be tiered up
shared->set_marked_for_tier_up(false);
// Flag combination --ignition-osr --no-turbo-from-bytecode is unsupported.
if (ignition_osr && !FLAG_turbo_from_bytecode) return MaybeHandle<Code>();
Handle<Code> cached_code;
// TODO(4764): When compiling for OSR from bytecode, BailoutId might derive
// from bytecode offset and overlap with actual BailoutId. No lookup!
......@@ -675,7 +672,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
// TurboFan can optimize directly from existing bytecode.
if (FLAG_turbo_from_bytecode && use_turbofan && ShouldUseIgnition(info)) {
if (use_turbofan && ShouldUseIgnition(info)) {
if (info->is_osr() && !ignition_osr) return MaybeHandle<Code>();
if (!Compiler::EnsureBytecode(info)) {
if (isolate->has_pending_exception()) isolate->clear_pending_exception();
......@@ -788,10 +785,9 @@ class InterpreterActivationsFinder : public ThreadVisitor,
JavaScriptFrameIterator it(isolate, top);
for (; !it.done(); it.Advance()) {
JavaScriptFrame* frame = it.frame();
if (FLAG_turbo_from_bytecode && FLAG_ignition_osr &&
frame->is_optimized() && frame->function()->shared() == shared_) {
// If we are able to optimize functions directly from bytecode, then
// there might be optimized OSR code active on the stack that is not
if (FLAG_ignition_osr && frame->is_optimized() &&
frame->function()->shared() == shared_) {
// There might be optimized OSR code active on the stack that is not
// reachable through a function. We count this as an activation.
has_activations_ = true;
}
......@@ -838,12 +834,9 @@ bool HasInterpreterActivations(
Isolate* isolate, InterpreterActivationsFinder* activations_finder) {
activations_finder->VisitThread(isolate, isolate->thread_local_top());
isolate->thread_manager()->IterateArchivedThreads(activations_finder);
if (FLAG_turbo_from_bytecode) {
// If we are able to optimize functions directly from bytecode, then there
// might be optimized functions that rely on bytecode being around. We need
// to prevent switching the given function to baseline code in those cases.
Deoptimizer::VisitAllOptimizedFunctions(isolate, activations_finder);
}
// There might be optimized functions that rely on bytecode being around. We
// need to prevent switching the given function to baseline code.
Deoptimizer::VisitAllOptimizedFunctions(isolate, activations_finder);
return activations_finder->has_activations();
}
......@@ -1372,7 +1365,7 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
Compiler::CompilationTier Compiler::NextCompilationTier(JSFunction* function) {
Handle<SharedFunctionInfo> shared(function->shared(), function->GetIsolate());
if (shared->code()->is_interpreter_trampoline_builtin()) {
if (FLAG_turbo_from_bytecode && UseTurboFan(shared)) {
if (UseTurboFan(shared)) {
return OPTIMIZED;
} else {
return BASELINE;
......
......@@ -427,7 +427,6 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
DEFINE_IMPLICATION(turbo, turbo_asm_deoptimization)
DEFINE_IMPLICATION(turbo, turbo_loop_peeling)
DEFINE_BOOL(turbo_from_bytecode, true, "enable building graphs from bytecode")
DEFINE_BOOL(turbo_sp_frame_access, false,
"use stack pointer-relative access to frame wherever possible")
DEFINE_BOOL(turbo_preprocess_ranges, true,
......
......@@ -25,8 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --ignition-osr --turbo-from-bytecode
// Flags: --allow-natives-syntax --expose-gc --ignition-osr
// IC and Crankshaft support for smi-only elements in dynamic array literals.
function get(foo) { return foo; } // Used to generate dynamic values.
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --ignition --ignition-osr --turbo-from-bytecode
// Flags: --allow-natives-syntax --ignition --ignition-osr
function f() {
for (var i = 0; i < 10; i++) {
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --use-osr --allow-natives-syntax --ignition-osr --turbo-from-bytecode
// Flags: --use-osr --allow-natives-syntax --ignition-osr
function f() {
do {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --ignition --ignition-osr --turbo-from-bytecode
// Flags: --allow-natives-syntax --ignition --ignition-osr
(function TestNonLoopyLoop() {
function f() {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --ignition --ignition-osr --turbo-from-bytecode --allow-natives-syntax
// Flags: --ignition --ignition-osr --allow-natives-syntax
function g() { return 23 }
function h() { return 42 }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --ignition --turbo-from-bytecode --always-opt --allow-natives-syntax
// Flags: --ignition --always-opt --allow-natives-syntax
try {
} catch(e) {; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --ignition --ignition-osr --turbo-from-bytecode
// Flags: --ignition --ignition-osr
function osr() {
for (var i = 0; i < 50000; ++i) Math.random();
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --ignition --turbo-from-bytecode --turbo-filter=f
// Flags: --allow-natives-syntax --ignition --turbo-filter=f
function f(x) { return x + 23 }
function g(x) { return f(x) + 42 }
......
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