v8/test/mjsunit/regress/regress-crbug-1276923.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
681 B
JavaScript
Raw Normal View History

Reland "[turbofan] Improve StoreStoreElimination" This is a reland of 863bc2b88a88caef91ec1afad528ef76d3749f54 Diff to original: - Don't eliminate GC observable stores that were temporarily unobservable during traversal. - Skip the previously added test for single-generation - Add new test Original change's description: > [turbofan] Improve StoreStoreElimination > > Previously, StoreStoreElimination handled allocations as > "can observe anything". This is pretty conservative and prohibits > elimination of repeated double stores to the same field. > With this CL allocations are changed to "observes initializing or > transitioning stores". > This way it is guaranteed that initializing stores to a freshly created > object or stores that are part of a map transition are not eliminated > before allocations (that can trigger GC), but allows elimination of > non-initializing, non-transitioning, unobservable stores in the > presence of allocations. > > Bug: v8:12200 > Change-Id: Ie1419696b9c8cb7c39aecf38d9f08102177b2c0f > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295449 > Commit-Queue: Patrick Thier <pthier@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Maya Lekova <mslekova@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78230} Bug: v8:12200, chromium:1276923, v8:12477 Change-Id: Ied45ee28ac12b370f7b232d2d338f93e10fea6b4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320460 Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#78349}
2021-12-13 08:49:33 +00:00
// Copyright 2021 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: --allow-natives-syntax --gc-interval=10
// Base case where a GC observable store might be temporarily shadowed.
function foo() {
let i = 0.1;
eval();
if (i) {
const c = {};
eval();
}
}
%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
// Stress execution with GCs.
function bar() {
for (let cnt = 0, i = 655; cnt < 10000 && i !== 1; cnt++, i = i / 3) {
Reland "[turbofan] Improve StoreStoreElimination" This is a reland of 863bc2b88a88caef91ec1afad528ef76d3749f54 Diff to original: - Don't eliminate GC observable stores that were temporarily unobservable during traversal. - Skip the previously added test for single-generation - Add new test Original change's description: > [turbofan] Improve StoreStoreElimination > > Previously, StoreStoreElimination handled allocations as > "can observe anything". This is pretty conservative and prohibits > elimination of repeated double stores to the same field. > With this CL allocations are changed to "observes initializing or > transitioning stores". > This way it is guaranteed that initializing stores to a freshly created > object or stores that are part of a map transition are not eliminated > before allocations (that can trigger GC), but allows elimination of > non-initializing, non-transitioning, unobservable stores in the > presence of allocations. > > Bug: v8:12200 > Change-Id: Ie1419696b9c8cb7c39aecf38d9f08102177b2c0f > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295449 > Commit-Queue: Patrick Thier <pthier@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Maya Lekova <mslekova@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78230} Bug: v8:12200, chromium:1276923, v8:12477 Change-Id: Ied45ee28ac12b370f7b232d2d338f93e10fea6b4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320460 Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#78349}
2021-12-13 08:49:33 +00:00
i %= 2;
const c = { "b": 1, "a":1, "c": 1, "d": 1 };
eval();
}
}
bar();