[dev.ssa] cmd/compile: optimize phi ops

Redo how we keep track of forward references when building SSA.
When the forward reference is resolved, update the Value node
in place.

Improve the phi elimination pass so it can simplify phis of phis.

Give SSA package access to decoded line numbers.  Fix line numbers
for constant booleans.

Change-Id: I3dc9896148d260be2f3dd14cbe5db639ec9fa6b7
Reviewed-on: https://go-review.googlesource.com/18674
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
This commit is contained in:
Keith Randall 2016-01-14 16:02:23 -08:00
parent 23d5810c8f
commit b5c5efd5de
8 changed files with 145 additions and 95 deletions

View file

@ -67,6 +67,9 @@ type Frontend interface {
// Auto returns a Node for an auto variable of the given type.
// The SSA compiler uses this function to allocate space for spills.
Auto(Type) GCNode
// Line returns a string describing the given line number.
Line(int32) string
}
// interface used to hold *gc.Node. We'd use *gc.Node directly but