1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:31:21 -06:00

[dev.ssa] cmd/compile: make GOSSAFUNC trigger logging

I find myself always adding this in temporarily.
Make it permanent.

Change-Id: I1646b3930a07d0ea01840736ccd449b7fd24f06e
Reviewed-on: https://go-review.googlesource.com/13141
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-08-04 11:13:56 -07:00
parent 573c791e81
commit 9495e45c80

View File

@ -20,7 +20,7 @@ import (
// it will never return nil, and the bool can be removed.
func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
name := fn.Func.Nname.Sym.Name
usessa = strings.HasSuffix(name, "_ssa")
usessa = strings.HasSuffix(name, "_ssa") || name == os.Getenv("GOSSAFUNC")
if usessa {
fmt.Println("generating SSA for", name)
@ -150,7 +150,7 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
// TODO: enable codegen more broadly once the codegen stabilizes
// and runtime support is in (gc maps, write barriers, etc.)
return s.f, usessa || name == os.Getenv("GOSSAFUNC") || localpkg.Name == os.Getenv("GOSSAPKG")
return s.f, usessa || localpkg.Name == os.Getenv("GOSSAPKG")
}
type state struct {