]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use staticValue for inlining logic
authorMatthew Dempsky <mdempsky@google.com>
Tue, 22 Sep 2020 09:19:14 +0000 (02:19 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 15 Oct 2020 18:35:44 +0000 (18:35 +0000)
commit1bcf6beec53ae811490fcd0ac29328b12b53702c
tree627a3c36a135a31b17cfeec18a6061a1322784f3
parent64fb6ae95f1c322486cbfb758552bb8439a8e6e8
cmd/compile: use staticValue for inlining logic

This CL replaces the ad hoc and duplicated logic for detecting
inlinable calls with a single "inlCallee" function, which uses the
"staticValue" helper function introduced in an earlier commit.

Updates #41474.

Change-Id: I103d4091b10366fce1344ef2501222b7df68f21d
Reviewed-on: https://go-review.googlesource.com/c/go/+/256460
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/inl.go
src/cmd/compile/internal/logopt/logopt_test.go
test/inline.go