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,
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillAll(
Zone* zone) const {
// Kill everything except for const fields
for (size_t i = 0; i < const_fields_.size(); ++i) {
if (const_fields_[i]) {
AbstractState* that = new (zone) AbstractState();
that->const_fields_ = const_fields_;
return that;
// TODO(tebbi): This is not a good way to disable const load elimination.
// It's just the safest to back-merge for crbug:983764.
if (FLAG_turbo_load_elimination_use_constness) {
// Kill everything except for const fields
for (size_t i = 0; i < const_fields_.size(); ++i) {
if (const_fields_[i]) {
AbstractState* that = new (zone) AbstractState();
that->const_fields_ = const_fields_;
return that;
}
}
}
return LoadElimination::empty_state();
......
......@@ -586,6 +586,8 @@ DEFINE_BOOL(analyze_environment_liveness, true,
DEFINE_BOOL(trace_environment_liveness, false,
"trace liveness of local variable slots")
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,
"trace TurboFan load elimination")
DEFINE_BOOL(turbo_profiling, false, "enable profiling in TurboFan")
......
......@@ -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
// Flags: --allow-natives-syntax --turbo-load-elimination-use-constness
// Check that load elimination on const-marked fields works
(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