mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: clean up SSA test API
I noted in CL 38327 that the SSA test API felt a bit clunky after the ssa.Func/ssa.Cache/ssa.Config refactoring, and promised to clean it up once the dust settled. The dust has settled. Along the way, this CL fixes a potential latent bug, in which the amd64 test context was used for all dummy Syslook calls. The lone SSA test using the s390x context did not depend on the Syslook context being correct, so the bug did not arise in practice. Change-Id: If964251d1807976073ad7f47da0b1f1f77c58413 Reviewed-on: https://go-review.googlesource.com/38346 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
62947bedd2
commit
a68e5d94fa
17 changed files with 117 additions and 89 deletions
|
|
@ -34,7 +34,7 @@ func benchmarkCopyElim(b *testing.B, n int) {
|
|||
}
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
fun := Fun(c, DummyFrontend{b}, "entry", Bloc("entry", values...))
|
||||
fun := c.Fun("entry", Bloc("entry", values...))
|
||||
Copyelim(fun.f)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue