]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/inline: refactor call site scoring
authorThan McIntosh <thanm@google.com>
Wed, 1 Nov 2023 18:20:05 +0000 (14:20 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 16 Nov 2023 20:07:59 +0000 (20:07 +0000)
commit322cd4e8078efc3c903aab2ab6fd1e0f200b282b
tree3853541463046424a340d54435c017b6b929f8b0
parent8d41d053e0886d1b67b8261330777222f7d96ac0
cmd/compile/internal/inline: refactor call site scoring

Rework the call site scoring process to relocate the code that looks
for interesting actual expressions at callsites (e.g. passing a
constant, passing a function pointer, etc) back into the original
callsite analysis phase, as opposed to trying to do the analysis at
scoring time. No changes to heuristics functionality; this doesn't
have much benefit here, but will make it easier later on (in a future
ptahc) to reduce ir.StaticValue calls.

Change-Id: I0e946f9589310a405951cb41835a819d38158e45
Reviewed-on: https://go-review.googlesource.com/c/go/+/539317
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/actualexprpropbits_string.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/analyze_func_callsites.go
src/cmd/compile/internal/inline/inlheur/callsite.go
src/cmd/compile/internal/inline/inlheur/scoring.go
src/cmd/compile/internal/inline/inlheur/testdata/props/calls.go