Skip to content

Commit

Permalink
cmd/callgraph: update flag docstring
Browse files Browse the repository at this point in the history
And add a TODO.

Change-Id: I51c63b32e9ac4309cdfb8228348a5d528f36a919
Reviewed-on: https://go-review.googlesource.com/10489
Reviewed-by: Robert Griesemer <gri@golang.org>
  • Loading branch information
adonovan committed May 29, 2015
1 parent 9c7ccd8 commit 8ccf558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/callgraph/main.go
Expand Up @@ -42,7 +42,7 @@ import (
)

var algoFlag = flag.String("algo", "rta",
`Call graph construction algorithm, one of "rta" or "pta"`)
`Call graph construction algorithm (static, cha, rta, pta)`)

var testFlag = flag.Bool("test", false,
"Loads test code (*_test.go) for imported packages")
Expand Down
2 changes: 2 additions & 0 deletions go/callgraph/static/static.go
Expand Up @@ -15,6 +15,8 @@ func CallGraph(prog *ssa.Program) *callgraph.Graph {
cg := callgraph.New(nil) // TODO(adonovan) eliminate concept of rooted callgraph

// TODO(adonovan): opt: use only a single pass over the ssa.Program.
// TODO(adonovan): opt: this is slower than RTA (perhaps because
// the lower precision means so many edges are allocated)!
for f := range ssautil.AllFunctions(prog) {
fnode := cg.CreateNode(f)
for _, b := range f.Blocks {
Expand Down

0 comments on commit 8ccf558

Please sign in to comment.