Commit 9495e45c authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

[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/13141Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 573c791e
......@@ -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 {
......
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