1
0
mirror of https://github.com/golang/go synced 2024-11-27 04:52:17 -07:00

cmd/compile: consider full number of struct components to deciding on inlining ==

Change-Id: I6bfbbce2ec5dfc7f9f99dbd82e51c2b0edacc87a
Reviewed-on: https://go-review.googlesource.com/59334
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-05-02 11:17:57 -07:00
parent 598950ca7f
commit b638760dad

View File

@ -3298,7 +3298,7 @@ func walkcompare(n *Node, init *Nodes) *Node {
// We can compare several elements at once with 2/4/8 byte integer compares
inline = t.NumElem() <= 1 || (issimple[t.Elem().Etype] && (t.NumElem() <= 4 || t.Elem().Width*t.NumElem() <= maxcmpsize))
case TSTRUCT:
inline = t.NumFields() <= 4
inline = t.NumComponents() <= 4
}
cmpl := n.Left