]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: tweak init function prologue
authorKeith Randall <khr@golang.org>
Tue, 26 Jan 2016 23:55:05 +0000 (15:55 -0800)
committerKeith Randall <khr@golang.org>
Fri, 29 Jan 2016 20:22:35 +0000 (20:22 +0000)
commitf3575a9561319d2398ab01dd0375e0909e2f2aa8
treecc29992c5457e7838cb084f5ba661151ad2c5ff9
parentf94e0745b3dc922ca7f3d15507e33ed6d3a65ee6
[dev.ssa] cmd/compile: tweak init function prologue

We used to compare the init state with == to 0 and 2, which
requires 2 comparisons.  Instead, compare with 1 and use
<, ==.  That requires only one comparison.

This isn't a big deal performance-wise, as it is just init
code.  But there is a fair amount of init code, so this
should help a bit with code size.

Change-Id: I4a2765f1005776f0edce28ac143f4b7596d95a68
Reviewed-on: https://go-review.googlesource.com/18948
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/init.go