Make Uncompress(Compress(ptr)) into a no-op. [v8/v8 : main]

0 views
Skip to first unread message

Anton Bikineev (Gerrit)

unread,
Jan 7, 2026, 11:56:45 AM (11 days ago) Jan 7
to Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Steinar H Gunderson

Anton Bikineev voted and added 1 comment

Votes added by Anton Bikineev

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Anton Bikineev . resolved

lgtm, thanks

For the context, we tried it in the past pre C++23 and it didn't work. At the time __builtin_assume__ was known to have issues that led to missing optimizations: https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609. I hope it's been fixed since then.

Open in Gerrit

Related details

Attention is currently required from:
  • Steinar H Gunderson
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 2
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 16:56:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Steinar H Gunderson (Gerrit)

unread,
Jan 7, 2026, 12:02:17 PM (11 days ago) Jan 7
to Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

Steinar H Gunderson voted and added 1 comment

Votes added by Steinar H Gunderson

Commit-Queue+2

1 comment

Patchset-level comments
Anton Bikineev . resolved

lgtm, thanks

For the context, we tried it in the past pre C++23 and it didn't work. At the time __builtin_assume__ was known to have issues that led to missing optimizations: https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609. I hope it's been fixed since then.

Steinar H Gunderson

As far as I know, the issues are exactly the same still,, and I believe [[assume]] is just a different syntax for exactly the same thing. I prototyped this in Compiler Explorer with __builtin_assume until I could get it to work reliably (which was nontrivial, as you discovered), then changed to [[assume]] because it's cleaner.

In other words, one could in theory see regressions with this, also around inlining heuristics. But it appears to be a win size-wise, no regression CPU-wise, and makes generally sense to me. Thus, mlippautz@ asked me to send it to you :-)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 2
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 17:02:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Anton Bikineev <biki...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Steinar H Gunderson (Gerrit)

unread,
Jan 7, 2026, 12:03:33 PM (11 days ago) Jan 7
to Michael Lippautz, V8 LUCI CQ, Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Steinar H Gunderson voted and added 1 comment

Votes added by Steinar H Gunderson

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
Steinar H Gunderson . resolved

+mlippautz for second V8 committer

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not 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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 2
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 17:03:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jan 7, 2026, 12:11:42 PM (11 days ago) Jan 7
to Steinar H Gunderson, V8 LUCI CQ, Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Steinar H Gunderson

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Michael Lippautz . resolved

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Steinar H Gunderson
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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 2
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 17:11:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Jan 7, 2026, 1:15:26 PM (10 days ago) Jan 7
to Steinar H Gunderson, Michael Lippautz, Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change

Change information

Commit message:
Make Uncompress(Compress(ptr)) into a no-op.

Add an [[assume]] annotation so that Clang understands this; it doesn't
by itself (because it requires information about high bits in the
uncompressed pointer that we've found it hard to teach it).

Doesn't give a Speedometer win by itself, but it reduces the APK size
of 64-bit Chrome by ~11 kB.
Change-Id: I1480f0032e3733972553b1e34eb4a7def5f157ed
Reviewed-by: Anton Bikineev <biki...@chromium.org>
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Commit-Queue: Michael Lippautz <mlip...@chromium.org>
Commit-Queue: Steinar H Gunderson <se...@chromium.org>
Auto-Submit: Steinar H Gunderson <se...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#104529}
Files:
  • M include/cppgc/internal/member-storage.h
Change size: XS
Delta: 1 file changed, 8 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Michael Lippautz, +1 by Anton Bikineev
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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 3
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
open
diffy
satisfied_requirement

Leszek Swirski (Gerrit)

unread,
Jan 8, 2026, 3:48:11 AM (10 days ago) Jan 8
to V8 LUCI CQ, Steinar H Gunderson, Michael Lippautz, Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

Leszek Swirski added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Leszek Swirski . resolved

fwiw we had to remove a similar optimisation in V8's heap, because of UB when the assumption was invalidated (which it could be because of sandbox corruption): https://chromium-review.googlesource.com/c/v8/v8/+/6402513. Probably not an issue here but worth being aware of.

Open in Gerrit

Related details

Attention set is empty
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: I1480f0032e3733972553b1e34eb4a7def5f157ed
Gerrit-Change-Number: 7277326
Gerrit-PatchSet: 3
Gerrit-Owner: Steinar H Gunderson <se...@chromium.org>
Gerrit-Reviewer: Anton Bikineev <biki...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
Gerrit-CC: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:48:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Steinar H Gunderson (Gerrit)

unread,
Jan 16, 2026, 5:22:57 AM (2 days ago) Jan 16
to V8 LUCI CQ, Leszek Swirski, Michael Lippautz, Anton Bikineev, chrom...@appspot.gserviceaccount.com, cbruni...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

Steinar H Gunderson has created a revert of this change

Related details

Attention set is empty
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: revert
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages