]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add valState to ssa sizeof tests
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 3 Jun 2017 15:25:15 +0000 (08:25 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sat, 3 Jun 2017 17:04:56 +0000 (17:04 +0000)
I learned from CL 41770 that valState’s size
matters to compiler performance.
Encode that knowledge in a test.

Change-Id: I7c0fde6a4cf460017619dbcce1c1ddaa7af10239
Reviewed-on: https://go-review.googlesource.com/44737
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/sizeof_test.go

index fa6820953469300658a2ffe0872216978a1fb6ce..9fab7b664f7693b843684cc2136a520dffae1303 100644 (file)
@@ -24,6 +24,7 @@ func TestSizeof(t *testing.T) {
        }{
                {Value{}, 68, 112},
                {Block{}, 152, 288},
+               {valState{}, 28, 40},
        }
 
        for _, tt := range tests {