aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/dom.go
diff options
context:
space:
mode:
authorTodd Neal <todd@tneal.org>2015-06-25 23:13:57 -0500
committerKeith Randall <khr@golang.org>2015-07-07 19:42:35 +0000
commit41dafe6ecc358f294e0e91b739b352858d0c01b4 (patch)
tree62cd1efa05b81699886ccdd9e0eecfe12573309e /src/cmd/compile/internal/ssa/dom.go
parent7d10a2c04a28ac09448a3a890141a56870f86232 (diff)
downloadgo-41dafe6ecc358f294e0e91b739b352858d0c01b4.tar.gz
go-41dafe6ecc358f294e0e91b739b352858d0c01b4.zip
[dev.ssa] cmd/compile/ssa: dominator tests and benchmarks
This change has some tests verifying functionality and an assortment of benchmarks of various block lists. It modifies NewBlock to allocate in contiguous blocks improving the performance of intersect() for extremely large graphs by 30-40%. benchmark old ns/op new ns/op delta BenchmarkDominatorsLinear-8 1185619 901154 -23.99% BenchmarkDominatorsFwdBack-8 1302138 863537 -33.68% BenchmarkDominatorsManyPred-8 404670521 247450911 -38.85% BenchmarkDominatorsMaxPred-8 455809002 471675119 +3.48% BenchmarkDominatorsMaxPredVal-8 819315864 468257300 -42.85% BenchmarkNilCheckDeep1-8 766 706 -7.83% BenchmarkNilCheckDeep10-8 2553 2209 -13.47% BenchmarkNilCheckDeep100-8 58606 57545 -1.81% BenchmarkNilCheckDeep1000-8 7753012 8025750 +3.52% BenchmarkNilCheckDeep10000-8 1224165946 789995184 -35.47% Change-Id: Id3d6bc9cb1138e8177934441073ac7873ddf7ade Reviewed-on: https://go-review.googlesource.com/11716 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/dom.go')
-rw-r--r--src/cmd/compile/internal/ssa/dom.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/dom.go b/src/cmd/compile/internal/ssa/dom.go
index 6f700ec7e9..b4d47c1350 100644
--- a/src/cmd/compile/internal/ssa/dom.go
+++ b/src/cmd/compile/internal/ssa/dom.go
@@ -55,7 +55,6 @@ func postorder(f *Func) []*Block {
// which maps block ID to the immediate dominator of that block.
// Unreachable blocks map to nil. The entry block maps to nil.
func dominators(f *Func) []*Block {
- // TODO: Benchmarks. See BenchmarkNilCheckDeep* for an example.
// A simple algorithm for now
// Cooper, Harvey, Kennedy