]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa: Add code to test generated opcode counts
authorKeith Randall <khr@golang.org>
Fri, 29 May 2015 23:20:33 +0000 (16:20 -0700)
committerKeith Randall <khr@golang.org>
Sat, 30 May 2015 05:09:59 +0000 (05:09 +0000)
commitb0da62903d045f6d3e832ba1181387a1e9ad33f1
tree3789408548bd52c7baa0719e29fa7cd2b02e9a60
parent7bdecbf840978e618665c284d273f81ce639a293
[dev.ssa] cmd/compile/internal/ssa: Add code to test generated opcode counts

Add test handler to count and check generated opcodes.  This will be
useful for testing that certain optimizations don't regress.

Also pass a *Config to the Fun constructor so that compile() works.

Change-Id: Iee679e87cf0bc635ddcbe433fc1bd4c1d9c953cc
Reviewed-on: https://go-review.googlesource.com/10502
Reviewed-by: Michael Matloob <michaelmatloob@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/deadcode_test.go
src/cmd/compile/internal/ssa/func_test.go