Commit e0ac5c53 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

[dev.ssa] cmd/compile: minor cleanup

Change-Id: Ib33f3b1cfa09f410675d275e214d8ddc246c53c3
Reviewed-on: https://go-review.googlesource.com/12548Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 61aa0953
...@@ -22,6 +22,7 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) { ...@@ -22,6 +22,7 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
usessa = strings.HasSuffix(name, "_ssa") usessa = strings.HasSuffix(name, "_ssa")
if usessa { if usessa {
fmt.Println("generating SSA for", name)
dumplist("buildssa-enter", fn.Func.Enter) dumplist("buildssa-enter", fn.Func.Enter)
dumplist("buildssa-body", fn.Nbody) dumplist("buildssa-body", fn.Nbody)
} }
...@@ -481,16 +482,14 @@ func (s *state) stmt(n *Node) { ...@@ -481,16 +482,14 @@ func (s *state) stmt(n *Node) {
s.startBlock(bThen) s.startBlock(bThen)
s.stmtList(n.Nbody) s.stmtList(n.Nbody)
b = s.endBlock() if b := s.endBlock(); b != nil {
if b != nil {
addEdge(b, bEnd) addEdge(b, bEnd)
} }
if n.Rlist != nil { if n.Rlist != nil {
s.startBlock(bElse) s.startBlock(bElse)
s.stmtList(n.Rlist) s.stmtList(n.Rlist)
b = s.endBlock() if b := s.endBlock(); b != nil {
if b != nil {
addEdge(b, bEnd) addEdge(b, bEnd)
} }
} }
......
...@@ -27,6 +27,7 @@ Regalloc ...@@ -27,6 +27,7 @@ Regalloc
- Handle 2-address instructions. - Handle 2-address instructions.
- Floating point registers - Floating point registers
- Make calls clobber all registers - Make calls clobber all registers
- Make liveness analysis non-quadratic.
StackAlloc: StackAlloc:
- Sort variables so all ptr-containing ones are first (so stack - Sort variables so all ptr-containing ones are first (so stack
...@@ -60,3 +61,5 @@ Other ...@@ -60,3 +61,5 @@ Other
expression subtrees in the output. expression subtrees in the output.
- Implement memory zeroing with REPSTOSQ and DuffZero - Implement memory zeroing with REPSTOSQ and DuffZero
- make deadstore work with zeroing. - make deadstore work with zeroing.
- Add a value range propagation optimization pass.
Use it for bounds check elimination and bitwidth reduction.
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