Commit 284379c
cmd/compile: remove rematerializable values from live set across calls
Remove rematerializable values in the live set across call operations,
preventing dead constant rematerialization.
When computing live values across function calls, rematerializable
values were being kept in the live set unnecessarily. This caused
the shuffling to rematerialize dead constants.
This change leads to code size reduction on arm64 linux:
Executable Old .text New .text Change
-------------------------------------------------------
asm 1969236 1964356 -0.25%
cgo 1739588 1734884 -0.27%
compile 8950788 8932500 -0.20%
cover 1877268 1872916 -0.23%
link 2572660 2565076 -0.29%
preprofile 866772 863828 -0.34%
vet 2888628 2881028 -0.26%
There seems also some compile time effect:
orig.results uexp.results
sec/op sec/op vs base
BleveIndexBatch100-4 7.414 ± 2% 7.352 ± 1% ~ (p=0.218 n=10)
ESBuildThreeJS-4 777.3m ± 1% 778.1m ± 1% ~ (p=0.529 n=10)
ESBuildRomeTS-4 197.3m ± 1% 199.0m ± 1% ~ (p=0.143 n=10)
EtcdPut-4 64.92m ± 2% 64.95m ± 2% ~ (p=0.912 n=10)
EtcdSTM-4 323.9m ± 1% 323.0m ± 1% ~ (p=0.393 n=10)
GoBuildKubelet-4 160.1 ± 0% 159.4 ± 0% -0.42% (p=0.001 n=10)
GoBuildKubeletLink-4 12.40 ± 1% 12.27 ± 1% ~ (p=0.529 n=10)
GoBuildIstioctl-4 125.8 ± 0% 125.2 ± 0% -0.42% (p=0.000 n=10)
GoBuildIstioctlLink-4 8.679 ± 0% 8.686 ± 1% ~ (p=0.912 n=10)
GoBuildFrontend-4 49.18 ± 0% 48.73 ± 0% -0.92% (p=0.000 n=10)
GoBuildFrontendLink-4 2.300 ± 1% 2.292 ± 1% -0.35% (p=0.043 n=10)
GopherLuaKNucleotide-4 37.77 ± 6% 38.07 ± 2% ~ (p=0.218 n=10)
MarkdownRenderXHTML-4 274.3m ± 0% 275.2m ± 0% +0.34% (p=0.003 n=10)
Tile38QueryLoad-4 650.7µ ± 0% 650.2µ ± 0% ~ (p=0.971 n=10)
geomean 2.130 2.127 -0.15%
Change-Id: I7a766195ee17bfd9e47d7a940864619f553416ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/707415
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>1 parent 519ae51 commit 284379c
2 files changed
+54
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2806 | 2806 | | |
2807 | 2807 | | |
2808 | 2808 | | |
| 2809 | + | |
2809 | 2810 | | |
2810 | 2811 | | |
2811 | 2812 | | |
| |||
2858 | 2859 | | |
2859 | 2860 | | |
2860 | 2861 | | |
| 2862 | + | |
2861 | 2863 | | |
2862 | 2864 | | |
2863 | 2865 | | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
2864 | 2876 | | |
2865 | 2877 | | |
2866 | 2878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
268 | 310 | | |
269 | 311 | | |
270 | 312 | | |
| |||
0 commit comments