Skip to content

Commit 08c87ab

Browse files
sethbrenithV8 LUCI CQ
authored andcommitted
Optimize spill placement in builtins
This change enables spill placement optimization for all values in builtins, rather than only for loop-top phi values. There is no correctness reason that this optimization is limited to loop-top phi values; I just chose that heuristic because I didn't have much evidence of benefits outside loops. See [1] for an overview of how spill placement optimization works. This change is beneficial not only because it saves a store instruction along some control-flow paths, but also because it gives the frame elider more freedom to avoid creating stack frames along those paths. I suspect that frame elision is more impactful for builtins than for JIT-compiled code, because builtins tend to be small functions called often, rather than large functions with loops. In Edge, I see about 0.3% improvement on Speedometer with this change. [1] https://docs.google.com/document/d/1n9ADWnDI-sw0OvdSmrthf61prmDqbDmQq-NSrQw2MVI/edit?usp=sharing Change-Id: Ibea4d63dda522cd8b1b95bbf4c67e10a1b3186e9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5002146 Commit-Queue: Seth Brenith <[email protected]> Reviewed-by: Thibaud Michaud <[email protected]> Cr-Commit-Position: refs/heads/main@{#90729}
1 parent e35eccf commit 08c87ab

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,7 @@ template("run_mksnapshot") {
23472347
"root_out_dir") + "/mksnapshot",
23482348
root_build_dir),
23492349
"--turbo_instruction_scheduling",
2350+
"--stress-turbo-late-spilling",
23502351

23512352
# In cross builds, the snapshot may be generated for both the host and
23522353
# target toolchains. The same host binary is used to generate both, so

0 commit comments

Comments
 (0)