]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/inline/inlheur: assign scores to callsites
authorThan McIntosh <thanm@google.com>
Tue, 18 Jul 2023 20:17:12 +0000 (16:17 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 8 Sep 2023 23:03:48 +0000 (23:03 +0000)
commit746f7e17449c82e58e33ea8f9b61107cff0317f2
treebd42d197c14162f9d866fed3dae21f2781763124
parentdc0548f92fa23fe61dbf165e29bcbad09d7fb499
cmd/compile/internal/inline/inlheur: assign scores to callsites

Assign scores to callsites based on previously computed function
properties and callsite properties. This currently works by taking the
size score for the function (as computed by CanInline) and then making
a series of adjustments, positive or negative based on various
function and callsite properties.

NB: much work also remaining on deciding what are the best score
adjustment values for specific heuristics. I've picked a bunch of
arbitrary constants, but they will almost certainly need tuning and
tweaking to arrive at something that has good performance.

Updates #61502.

Change-Id: I887403f95e76d7aa2708494b8686c6026861a6ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/511566
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/inline/inlheur/analyze.go
src/cmd/compile/internal/inline/inlheur/analyze_func_callsites.go
src/cmd/compile/internal/inline/inlheur/callsite.go
src/cmd/compile/internal/inline/inlheur/funcprops_test.go
src/cmd/compile/internal/inline/inlheur/scoreadjusttyp_string.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/scoring.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/testdata/props/acrosscall.go
src/cmd/compile/internal/inline/inlheur/testdata/props/calls.go
src/cmd/compile/internal/inline/inlheur/testdata/props/funcflags.go