]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssa: remove unused Typ fields
authorMatthew Dempsky <mdempsky@google.com>
Tue, 11 Apr 2017 05:16:43 +0000 (22:16 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 11 Apr 2017 06:18:36 +0000 (06:18 +0000)
These are never accessed.

Change-Id: I45975972d19d1f263f6545c9ed648511501094c6
Reviewed-on: https://go-review.googlesource.com/40315
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/value.go
src/cmd/compile/internal/ssa/writebarrier.go

index 75acaa3ebcecf6ea555c2a836c10ec73bb5e8c45..2e62ee32f4702ada03d3d296010c508b1ad49511 100644 (file)
@@ -157,7 +157,7 @@ func buildssa(fn *Node) *ssa.Func {
        for _, n := range fn.Func.Dcl {
                switch n.Class {
                case PPARAM, PPARAMOUT:
-                       aux := s.lookupSymbol(n, &ssa.ArgSymbol{Typ: n.Type, Node: n})
+                       aux := s.lookupSymbol(n, &ssa.ArgSymbol{Node: n})
                        s.decladdrs[n] = s.entryNewValue1A(ssa.OpAddr, types.NewPtr(n.Type), aux, s.sp)
                        if n.Class == PPARAMOUT && s.canSSA(n) {
                                // Save ssa-able PPARAMOUT variables so we can
@@ -3212,18 +3212,18 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value {
                        }
                        if n == nodfp {
                                // Special arg that points to the frame pointer (Used by ORECOVER).
-                               aux := s.lookupSymbol(n, &ssa.ArgSymbol{Typ: n.Type, Node: n})
+                               aux := s.lookupSymbol(n, &ssa.ArgSymbol{Node: n})
                                return s.entryNewValue1A(ssa.OpAddr, t, aux, s.sp)
                        }
                        s.Fatalf("addr of undeclared ONAME %v. declared: %v", n, s.decladdrs)
                        return nil
                case PAUTO:
-                       aux := s.lookupSymbol(n, &ssa.AutoSymbol{Typ: n.Type, Node: n})
+                       aux := s.lookupSymbol(n, &ssa.AutoSymbol{Node: n})
                        return s.newValue1A(ssa.OpAddr, t, aux, s.sp)
                case PPARAMOUT: // Same as PAUTO -- cannot generate LEA early.
                        // ensure that we reuse symbols for out parameters so
                        // that cse works on their addresses
-                       aux := s.lookupSymbol(n, &ssa.ArgSymbol{Typ: n.Type, Node: n})
+                       aux := s.lookupSymbol(n, &ssa.ArgSymbol{Node: n})
                        return s.newValue1A(ssa.OpAddr, t, aux, s.sp)
                default:
                        s.Fatalf("variable address class %v not implemented", classnames[n.Class])
index d5974d4eb2d73f5724fcc6a4752b16e03c05b963..1bc63bce5a262773a561cfeef3e407420d055d22 100644 (file)
@@ -246,14 +246,12 @@ type ExternSymbol struct {
 // ArgSymbol is an aux value that encodes an argument or result
 // variable's constant offset from FP (FP = SP + framesize).
 type ArgSymbol struct {
-       Typ  Type   // Go type
        Node GCNode // A *gc.Node referring to the argument/result variable.
 }
 
 // AutoSymbol is an aux value that encodes a local variable's
 // constant offset from SP.
 type AutoSymbol struct {
-       Typ  Type   // Go type
        Node GCNode // A *gc.Node referring to a local (auto) variable.
 }
 
index 1b6e51c674e630e0bec3556513917d628d1d9e16..e8e5a26f301b6dfb73e3cf672d162d014b50ff71 100644 (file)
@@ -265,7 +265,7 @@ func wbcall(pos src.XPos, b *Block, fn *obj.LSym, typ interface{}, ptr, val, mem
                // value we're trying to move.
                t := val.Type.ElemType()
                tmp = b.Func.fe.Auto(val.Pos, t)
-               aux := &AutoSymbol{Typ: t, Node: tmp}
+               aux := &AutoSymbol{Node: tmp}
                mem = b.NewValue1A(pos, OpVarDef, TypeMem, tmp, mem)
                tmpaddr := b.NewValue1A(pos, OpAddr, t.PtrTo(), aux, sp)
                siz := t.Size()