[dev.ssa] cmd/internal/ssa: SSA cleanups

Mostly suggested by Alan.
Convert Const* ops to just one Const op.
Use more of go/types.
Get rid of typers, all types must be specified explicitly.

Change-Id: Id4758f2b887d8a6888e88a7e047d97af55e34b62
Reviewed-on: https://go-review.googlesource.com/8110
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Keith Randall 2015-03-26 10:49:03 -07:00
parent 7b96284295
commit 2c9b491e01
16 changed files with 269 additions and 172 deletions

View file

@ -20,7 +20,7 @@ func deadcode(f *Func) {
// constant-fold conditionals
// TODO: rewrite rules instead?
if b.Kind == BlockIf && b.Control.Op == OpConstBool {
if b.Kind == BlockIf && b.Control.Op == OpConst {
cond := b.Control.Aux.(bool)
var c *Block
if cond {