aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/func_test.go
diff options
context:
space:
mode:
authorTodd Neal <todd@tneal.org>2015-08-28 21:36:29 -0500
committerTodd Neal <todd@tneal.org>2015-08-29 13:10:49 +0000
commit47d6799b0f1d51f8f749eeebfe5769ea555b5228 (patch)
tree07c48d5135fba853bdb9bf812c2068e1640877bd /src/cmd/compile/internal/ssa/func_test.go
parent67e43c1e3b3e2470b870a9d5b5e6eedceeded5f1 (diff)
downloadgo-47d6799b0f1d51f8f749eeebfe5769ea555b5228.tar.gz
go-47d6799b0f1d51f8f749eeebfe5769ea555b5228.zip
[dev.ssa] cmd/compile: move addEdge function to ssa
addEdge had two identical implementations so make it an exported method on Block. Change-Id: I8c21655a9dc5074fefd7f63b2f5b51897571e608 Reviewed-on: https://go-review.googlesource.com/14040 Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/func_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/func_test.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/ssa/func_test.go b/src/cmd/compile/internal/ssa/func_test.go
index 4bdc84bd4c..dc5d220db8 100644
--- a/src/cmd/compile/internal/ssa/func_test.go
+++ b/src/cmd/compile/internal/ssa/func_test.go
@@ -179,7 +179,7 @@ func Fun(c *Config, entry string, blocs ...bloc) fun {
}
// Connect to successors.
for _, succ := range c.succs {
- addEdge(b, blocks[succ])
+ b.AddEdgeTo(blocks[succ])
}
}
return fun{f, blocks, values}
@@ -256,11 +256,6 @@ type valu struct {
args []string
}
-func addEdge(b, c *Block) {
- b.Succs = append(b.Succs, c)
- c.Preds = append(c.Preds, b)
-}
-
func TestArgs(t *testing.T) {
c := testConfig(t)
fun := Fun(c, "entry",