Commit 8a9dc053 authored by Keith Randall's avatar Keith Randall

cmd/compile: allow inlining of functions with intrinsics in them

Intrinsics are ok to inline as they don't rewrite to actual calls.

Change-Id: Ieb19c834c61579823c62c6d1a1b425d6c4d4de23
Reviewed-on: https://go-review.googlesource.com/34272
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
parent 73f92f9b
......@@ -204,6 +204,10 @@ func ishairy(n *Node, budget *int32, reason *string) bool {
*budget -= fn.InlCost
break
}
if isIntrinsicCall(n) {
*budget--
break
}
if n.isMethodCalledAsFunction() {
if d := n.Left.Sym.Def; d != nil && d.Func.Inl.Len() != 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment