]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: write "properties" to export data for inlinable funcs
authorThan McIntosh <thanm@google.com>
Thu, 29 Jun 2023 17:22:26 +0000 (13:22 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 8 Sep 2023 23:02:15 +0000 (23:02 +0000)
commit323cf730912bc4ad975766118ba2da88a6e80a6b
tree676c0ceb27b19d8af327a077e028c6c2a7e952f0
parent906a073b0badf3c76cb8225f376195da594fe5b4
cmd/compile: write "properties" to export data for inlinable funcs

Augment the ir.Inline container to include an entry for function
properties (currently serialized as a string), and if
GOEXPERIMENT=newinliner is set, compute and store function
properties for all inline candidates processed by the inliner.

The idea here is that if the function properties are going to drive
inlining decisions, we'd like to have the same info from non-local /
imported functions as for local / in-package functions, hence we need
to include the properties in the export data.

Hand testing on the compiler itself and with k8s kubelet shows that
this increases the size of export data overall by about 2-3 percent,
so a pretty modest increase.

Updates #61502.

Change-Id: I9d1c311aa8418d02ffea3629c3dd9d8076886d15
Reviewed-on: https://go-review.googlesource.com/c/go/+/511562
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/inl.go
src/cmd/compile/internal/inline/inlheur/analyze.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/noder/linker.go
src/cmd/compile/internal/noder/reader.go