]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/inline: rework use of ir.StaticValue
authorThan McIntosh <thanm@google.com>
Fri, 27 Oct 2023 12:58:16 +0000 (08:58 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 21 Nov 2023 16:30:33 +0000 (16:30 +0000)
commitbbcd85528cbad2dca72378181cb230e59a43ef80
tree3fa80666faf45e9c3555aeaba1d3520af2b07bca
parent8eecf26e3f13192be66e908cc55646b7f71c568c
cmd/compile/internal/inline: rework use of ir.StaticValue

When running the code to compute function properties that feed
inlining heuristics, the existing heuristics implementation makes
fairly extensive use of ir.StaticValue and ir.Reassigned to sharpen
the analysis. These calls turn out to cause a significant compile time
increase, due to the fact that each call can potentially walk every
node in the IR for the function. To help with this problem, switch the
heuristics code over to using the new "batch mode" reassignment helper
added in the previous CL.

Change-Id: Ib15a62416134386e34b7cfa1130a4b413a37b225
Reviewed-on: https://go-review.googlesource.com/c/go/+/537977
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/inline/inlheur/analyze.go
src/cmd/compile/internal/inline/inlheur/analyze_func_callsites.go
src/cmd/compile/internal/inline/inlheur/analyze_func_params.go
src/cmd/compile/internal/inline/inlheur/analyze_func_returns.go
src/cmd/compile/internal/inline/inlheur/names.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/score_callresult_uses.go
src/cmd/compile/internal/inline/inlheur/scoring.go