| Code-Review | +1 |
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
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.
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 :-)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
+mlippautz for second V8 committer
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |