Commit 9ce67926 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[turbofan] temporarily disable const-based load elimination

This is a safe to merge hot-fix to tackle https://crbug.com/983764.
To be reverted after merging to M77.

Bug: chromium:983764
Change-Id: I3cd27481f224b352ef6bcf9dde21a8f77616acff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1786285Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63570}
parent 029e8ab9
...@@ -629,12 +629,16 @@ LoadElimination::AbstractState::KillFields(Node* object, MaybeHandle<Name> name, ...@@ -629,12 +629,16 @@ LoadElimination::AbstractState::KillFields(Node* object, MaybeHandle<Name> name,
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillAll( LoadElimination::AbstractState const* LoadElimination::AbstractState::KillAll(
Zone* zone) const { Zone* zone) const {
// Kill everything except for const fields // TODO(tebbi): This is not a good way to disable const load elimination.
for (size_t i = 0; i < const_fields_.size(); ++i) { // It's just the safest to back-merge for crbug:983764.
if (const_fields_[i]) { if (FLAG_turbo_load_elimination_use_constness) {
AbstractState* that = new (zone) AbstractState(); // Kill everything except for const fields
that->const_fields_ = const_fields_; for (size_t i = 0; i < const_fields_.size(); ++i) {
return that; if (const_fields_[i]) {
AbstractState* that = new (zone) AbstractState();
that->const_fields_ = const_fields_;
return that;
}
} }
} }
return LoadElimination::empty_state(); return LoadElimination::empty_state();
......
...@@ -586,6 +586,8 @@ DEFINE_BOOL(analyze_environment_liveness, true, ...@@ -586,6 +586,8 @@ DEFINE_BOOL(analyze_environment_liveness, true,
DEFINE_BOOL(trace_environment_liveness, false, DEFINE_BOOL(trace_environment_liveness, false,
"trace liveness of local variable slots") "trace liveness of local variable slots")
DEFINE_BOOL(turbo_load_elimination, true, "enable load elimination in TurboFan") DEFINE_BOOL(turbo_load_elimination, true, "enable load elimination in TurboFan")
DEFINE_BOOL(turbo_load_elimination_use_constness, false,
"use constness in TurboFan load elimination")
DEFINE_BOOL(trace_turbo_load_elimination, false, DEFINE_BOOL(trace_turbo_load_elimination, false,
"trace TurboFan load elimination") "trace TurboFan load elimination")
DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan") DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan")
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax --turbo-load-elimination-use-constness
// Check that load elimination on const-marked fields works // Check that load elimination on const-marked fields works
(function() { (function() {
......
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