mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: output cost while inlining function with Debug['m'] > 1
The existing implementation outputs inline cost iff function cannot be inlined with Debug['m'] > 1, the cost info is also useful if the function is inlineable. Fixes #36780 Change-Id: Ic96f6baf96aee25fb4b33d31d4d644dc2310e536 Reviewed-on: https://go-review.googlesource.com/c/go/+/216778 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
26aadfa044
commit
ee46f135a9
4 changed files with 6 additions and 6 deletions
|
|
@ -12,7 +12,7 @@ func Foo(x int) int { // ERROR "cannot inline Foo: marked go:norace with -race c
|
|||
return x * (x + 1) * (x + 2)
|
||||
}
|
||||
|
||||
func Bar(x int) int { // ERROR "can inline Bar as: func\(int\) int { return x \* \(x \+ 1\) \* \(x \+ 2\) }$"
|
||||
func Bar(x int) int { // ERROR "can inline Bar with cost .* as: func\(int\) int { return x \* \(x \+ 1\) \* \(x \+ 2\) }$"
|
||||
return x * (x + 1) * (x + 2)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue