Commit 7a9f6c2b authored by Keith Randall's avatar Keith Randall

cmd/compile: benchmark needs dominator tree

Now that CSE uses dom tree to order partitions, we need the
dom tree computed before benchmarking CSE.

Fixes #15801

Change-Id: Ifa4702c7b75250f34de185e69a880b3f3cc46a12
Reviewed-on: https://go-review.googlesource.com/23361Reviewed-by: 's avatarDavid Chase <drchase@google.com>
parent 30fc940c
......@@ -35,7 +35,7 @@ func benchFnPass(b *testing.B, fn passFunc, size int, bg blockGen) {
b.ReportAllocs()
c := NewConfig("amd64", DummyFrontend{b}, nil, true)
fun := Fun(c, "entry", bg(size)...)
domTree(fun.f)
CheckFunc(fun.f)
b.ResetTimer()
for i := 0; i < b.N; i++ {
......@@ -51,7 +51,7 @@ func benchFnBlock(b *testing.B, fn passFunc, bg blockGen) {
b.ReportAllocs()
c := NewConfig("amd64", DummyFrontend{b}, nil, true)
fun := Fun(c, "entry", bg(b.N)...)
domTree(fun.f)
CheckFunc(fun.f)
b.ResetTimer()
for i := 0; i < passCount; i++ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment