]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/inline: analyze function result properties
authorThan McIntosh <thanm@google.com>
Fri, 30 Jun 2023 17:41:59 +0000 (13:41 -0400)
committerThan McIntosh <thanm@google.com>
Wed, 6 Sep 2023 18:30:19 +0000 (18:30 +0000)
commit3f0f76734e981bf62322f9ecd738839c0f7c54b3
tree1c81a708f936864ece28057cd55f906a0f862e81
parent3d62c76736717613c4a921e45f59d40190c0792e
cmd/compile/internal/inline: analyze function result properties

Add code to analyze properties of function result values, specifically
heuristics for cases where we always return allocated memory, always
return the same constant, or always return the same function.

Updates #61502.

Change-Id: I8b0a3295b5be7f7ad4c2d5b9803925aea0639376
Reviewed-on: https://go-review.googlesource.com/c/go/+/511559
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_returns.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/funcprops_test.go
src/cmd/compile/internal/inline/inlheur/testdata/props/funcflags.go
src/cmd/compile/internal/inline/inlheur/testdata/props/returns.go [new file with mode: 0644]
src/cmd/compile/internal/inline/inlheur/trace_off.go
src/cmd/compile/internal/inline/inlheur/trace_on.go