]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: minor cleanup
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 21 Jul 2015 01:42:45 +0000 (18:42 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 23 Jul 2015 17:10:28 +0000 (17:10 +0000)
Change-Id: Ib33f3b1cfa09f410675d275e214d8ddc246c53c3
Reviewed-on: https://go-review.googlesource.com/12548
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/TODO

index 96756b11d07dc23ef37e3c6fd5a3d0970592a69f..9b5606a32fa1de69ec8c408b0e013fe772ac80f5 100644 (file)
@@ -22,6 +22,7 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
        usessa = strings.HasSuffix(name, "_ssa")
 
        if usessa {
+               fmt.Println("generating SSA for", name)
                dumplist("buildssa-enter", fn.Func.Enter)
                dumplist("buildssa-body", fn.Nbody)
        }
@@ -481,16 +482,14 @@ func (s *state) stmt(n *Node) {
 
                s.startBlock(bThen)
                s.stmtList(n.Nbody)
-               b = s.endBlock()
-               if b != nil {
+               if b := s.endBlock(); b != nil {
                        addEdge(b, bEnd)
                }
 
                if n.Rlist != nil {
                        s.startBlock(bElse)
                        s.stmtList(n.Rlist)
-                       b = s.endBlock()
-                       if b != nil {
+                       if b := s.endBlock(); b != nil {
                                addEdge(b, bEnd)
                        }
                }
index cfaf520510c830a30f2443534953a403eecf4ba1..0074ded5d12177a97d0612b0420f2c700ef833dd 100644 (file)
@@ -27,6 +27,7 @@ Regalloc
  - Handle 2-address instructions.
  - Floating point registers
  - Make calls clobber all registers
+ - Make liveness analysis non-quadratic.
 
 StackAlloc:
  - Sort variables so all ptr-containing ones are first (so stack
@@ -60,3 +61,5 @@ Other
    expression subtrees in the output.
  - Implement memory zeroing with REPSTOSQ and DuffZero
  - make deadstore work with zeroing.
+ - Add a value range propagation optimization pass.
+   Use it for bounds check elimination and bitwidth reduction.