cmd/compile: move FuncAssignments into ReassignOracle
The standalone ir.FuncAssignments walked the entire enclosing
function on every call. Move it into ReassignOracle, which collects
the same information in a single walk during Init alongside the
existing singleDef analysis.
compilebench results (this CL vs parent):
│ parent.txt │ commit.txt │
│ sec/op │ sec/op vs base │
Template 153.1m ± 16% 149.5m ± 7% ~ (p=0.699 n=6)
Unicode 115.0m ± 15% 116.1m ± 8% ~ (p=0.310 n=6)
GoTypes 876.2m ± 2% 872.1m ± 2% ~ (p=0.699 n=6)
Compiler 156.4m ± 9% 158.2m ± 8% ~ (p=0.818 n=6)
SSA 7.044 ± 1% 7.044 ± 1% ~ (p=0.937 n=6)
Flate 172.5m ± 4% 165.7m ± 11% ~ (p=0.132 n=6)
GoParser 168.0m ± 3% 169.5m ± 13% ~ (p=0.937 n=6)
Reflect 394.2m ± 3% 391.3m ± 4% ~ (p=0.937 n=6)
Tar 167.1m ± 13% 167.9m ± 15% ~ (p=0.589 n=6)
XML 200.0m ± 7% 197.5m ± 15% ~ (p=1.000 n=6)
LinkCompiler 638.3m ± 3% 631.2m ± 5% ~ (p=0.699 n=6)
ExternalLinkCompiler 2.197 ± 2% 2.192 ± 1% ~ (p=0.699 n=6)
LinkWithoutDebugCompiler 422.2m ± 4% 425.8m ± 3% ~ (p=0.093 n=6)
StdCmd 29.01 ± 2% 28.73 ± 1% ~ (p=0.394 n=6)
geomean 522.0m 519.4m -0.50%
│ parent.txt │ commit.txt │
│ user-sec/op │ user-sec/op vs base │
Template 727.0m ± 15% 692.6m ± 8% ~ (p=1.000 n=6)
Unicode 159.7m ± 6% 161.9m ± 6% ~ (p=0.589 n=6)
GoTypes 4.884 ± 1% 4.907 ± 1% ~ (p=0.937 n=6)
Compiler 470.5m ± 9% 476.9m ± 11% ~ (p=0.699 n=6)
SSA 37.17 ± 2% 37.40 ± 2% ~ (p=0.132 n=6)
Flate 776.9m ± 9% 749.1m ± 16% ~ (p=0.699 n=6)
GoParser 688.5m ± 5% 676.7m ± 6% ~ (p=0.937 n=6)
Reflect 1.861 ± 2% 1.910 ± 3% ~ (p=0.065 n=6)
Tar 750.6m ± 11% 762.4m ± 23% ~ (p=0.937 n=6)
XML 947.8m ± 13% 926.4m ± 12% ~ (p=0.485 n=6)
LinkCompiler 1.035 ± 6% 1.037 ± 5% ~ (p=0.818 n=6)
ExternalLinkCompiler 2.505 ± 2% 2.506 ± 2% ~ (p=0.699 n=6)
LinkWithoutDebugCompiler 479.0m ± 6% 490.4m ± 3% ~ (p=0.394 n=6)
geomean 1.181 1.180 -0.15%
│ parent.txt │ commit.txt │
│ text-bytes │ text-bytes vs base │
HelloSize 1.110Mi ± 0% 1.110Mi ± 0% ~ (p=1.000 n=6) ¹
CmdGoSize 14.14Mi ± 0% 14.14Mi ± 0% ~ (p=1.000 n=6) ¹
geomean 3.961Mi 3.961Mi +0.00%
¹ all samples are equal
│ parent.txt │ commit.txt │
│ data-bytes │ data-bytes vs base │
HelloSize 27.54Ki ± 0% 27.54Ki ± 0% ~ (p=1.000 n=6) ¹
CmdGoSize 431.4Ki ± 0% 431.4Ki ± 0% ~ (p=1.000 n=6) ¹
geomean 109.0Ki 109.0Ki +0.00%
¹ all samples are equal
│ parent.txt │ commit.txt │
│ bss-bytes │ bss-bytes vs base │
HelloSize 213.9Ki ± 0% 213.9Ki ± 0% ~ (p=1.000 n=6) ¹
CmdGoSize 32.27Mi ± 0% 32.27Mi ± 0% ~ (p=1.000 n=6) ¹
geomean 2.597Mi 2.597Mi +0.00%
¹ all samples are equal
│ parent.txt │ commit.txt │
│ exe-bytes │ exe-bytes vs base │
HelloSize 1.782Mi ± 0% 1.782Mi ± 0% ~ (p=1.000 n=6) ¹
CmdGoSize 21.29Mi ± 0% 21.29Mi ± 0% ~ (p=1.000 n=6) ¹
geomean 6.158Mi 6.158Mi +0.00%
¹ all samples are equal
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |