[maglev][turbolev] Reduce Array.prototype.indexOf and includes [v8/v8 : main]

0 views
Skip to first unread message

Olivier Flückiger (Gerrit)

unread,
Jul 23, 2026, 10:37:56 AM (2 days ago) Jul 23
to Victor Gomes, v8-s...@luci-project-accounts.iam.gserviceaccount.com, chrom...@appspot.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Victor Gomes

Olivier Flückiger voted and added 1 comment

Votes added by Olivier Flückiger

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Olivier Flückiger . resolved

ptal

Open in Gerrit

Related details

Attention is currently required from:
  • Victor Gomes
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
Gerrit-Change-Number: 8137542
Gerrit-PatchSet: 6
Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
Gerrit-Attention: Victor Gomes <victo...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Jul 2026 14:37:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Victor Gomes (Gerrit)

unread,
Jul 23, 2026, 11:38:04 AM (2 days ago) Jul 23
to Olivier Flückiger, v8-s...@luci-project-accounts.iam.gserviceaccount.com, chrom...@appspot.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Olivier Flückiger

Victor Gomes voted and added 4 comments

Votes added by Victor Gomes

Code-Review+1

4 comments

Patchset-level comments
Victor Gomes . resolved

LGTM % nits

File src/maglev/maglev-graph-builder.h
Line 847, Patchset 6 (Latest): V(ArrayIndexOf) \
V(ArrayIncludes) \
Victor Gomes . unresolved

Let's move it to MaglevReducer. It is shared with MaglevGraphOpitimizer.

File src/maglev/maglev-graph-builder.cc
Line 8223, Patchset 6 (Latest): compiler::JSFunctionRef target, CallArguments& args, ReducerCb Reducer) {
Victor Gomes . unresolved

target is unused. we could drop it.

File test/mjsunit/compiler/deopt-array-prototype-includes.js
Line 125, Patchset 6 (Latest): assertTrue(isOptimized(includes_in_range_neg));
Victor Gomes . unresolved

Use assertOptimized/assertUnoptimized

Open in Gerrit

Related details

Attention is currently required from:
  • Olivier Flückiger
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
Gerrit-Change-Number: 8137542
Gerrit-PatchSet: 6
Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Jul 2026 15:38:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jul 24, 2026, 4:31:18 AM (yesterday) Jul 24
to Olivier Flückiger, Victor Gomes, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Olivier Flückiger and Victor Gomes

Message from chrom...@appspot.gserviceaccount.com

📍 Job mac-m1_mini_2020-perf/jetstream3.crossbench complete.

See results at: https://pinpoint-dot-chromeperf.appspot.com/job/14cb284a290000

Open in Gerrit

Related details

Attention is currently required from:
  • Olivier Flückiger
  • Victor Gomes
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
Gerrit-Change-Number: 8137542
Gerrit-PatchSet: 9
Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
Gerrit-Attention: Victor Gomes <victo...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Jul 2026 08:31:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Olivier Flückiger (Gerrit)

unread,
Jul 24, 2026, 4:57:29 AM (yesterday) Jul 24
to Victor Gomes, v8-s...@luci-project-accounts.iam.gserviceaccount.com, chrom...@appspot.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Olivier Flückiger and Victor Gomes

Olivier Flückiger voted and added 4 comments

Votes added by Olivier Flückiger

Auto-Submit+1
Commit-Queue+1

4 comments

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Olivier Flückiger . resolved

ptal again, had to move some infra to the reducers as well

File src/maglev/maglev-graph-builder.h
Line 847, Patchset 6: V(ArrayIndexOf) \
V(ArrayIncludes) \
Victor Gomes . resolved

Let's move it to MaglevReducer. It is shared with MaglevGraphOpitimizer.

Olivier Flückiger

Done

File src/maglev/maglev-graph-builder.cc
Line 8223, Patchset 6: compiler::JSFunctionRef target, CallArguments& args, ReducerCb Reducer) {
Victor Gomes . resolved

target is unused. we could drop it.

Olivier Flückiger

Done

File test/mjsunit/compiler/deopt-array-prototype-includes.js
Line 125, Patchset 6: assertTrue(isOptimized(includes_in_range_neg));
Victor Gomes . resolved

Use assertOptimized/assertUnoptimized

Olivier Flückiger

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Olivier Flückiger
  • Victor Gomes
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
    Gerrit-Change-Number: 8137542
    Gerrit-PatchSet: 9
    Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Attention: Victor Gomes <victo...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 08:57:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Victor Gomes <victo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Victor Gomes (Gerrit)

    unread,
    Jul 24, 2026, 5:58:35 AM (23 hours ago) Jul 24
    to Olivier Flückiger, v8-s...@luci-project-accounts.iam.gserviceaccount.com, chrom...@appspot.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
    Attention needed from Olivier Flückiger

    Victor Gomes voted and added 1 comment

    Votes added by Victor Gomes

    Code-Review+1
    Commit-Queue+2

    1 comment

    Patchset-level comments
    Victor Gomes . resolved

    LGTM! Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Olivier Flückiger
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
    Gerrit-Change-Number: 8137542
    Gerrit-PatchSet: 9
    Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    Gerrit-Attention: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Jul 2026 09:58:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    v8-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    Jul 24, 2026, 6:00:41 AM (23 hours ago) Jul 24
    to Olivier Flückiger, Victor Gomes, chrom...@appspot.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org

    v8-s...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Change information

    Commit message:
    [maglev][turbolev] Reduce Array.prototype.indexOf and includes

    Array.prototype.indexOf and includes were unhandled in Maglev.

    This change implements TryReduceArrayIndexOf and TryReduceArrayIncludes
    as a Maglev reducer. To do so we need to move the required
    infrastructure from graph builder to reducer. The optimization checks
    receiver type feedback, validates elements kinds, clamps negative
    fromIndex offsets, and finally calls the specialized search builtin
    stubs.

    +5% on turbolev-future on chai-wtb

    TAG=agy
    CONV=48846e0d-ba67-4e2f-8a84-a1c31d45a364
    Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
    Commit-Queue: Victor Gomes <victo...@chromium.org>
    Auto-Submit: Olivier Flückiger <ol...@chromium.org>
    Reviewed-by: Victor Gomes <victo...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108861}
    Files:
    • M src/maglev/maglev-graph-builder.cc
    • M src/maglev/maglev-graph-builder.h
    • M src/maglev/maglev-reducer-inl.h
    • M src/maglev/maglev-reducer.h
    • M test/mjsunit/compiler/deopt-array-prototype-includes.js
    • M test/mjsunit/compiler/deopt-array-prototype-indexof.js
    Change size: L
    Delta: 6 files changed, 280 insertions(+), 42 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Victor Gomes
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: Id324c1da54cf51db1dd62c329b4a2ec73f14dc7b
    Gerrit-Change-Number: 8137542
    Gerrit-PatchSet: 10
    Gerrit-Owner: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Olivier Flückiger <ol...@chromium.org>
    Gerrit-Reviewer: Victor Gomes <victo...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages