Commit 2a8d99e4 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile/internal/ssa: remove unused Typ fields

These are never accessed.

Change-Id: I45975972d19d1f263f6545c9ed648511501094c6
Reviewed-on: https://go-review.googlesource.com/40315
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 5a8eae6d
...@@ -157,7 +157,7 @@ func buildssa(fn *Node) *ssa.Func { ...@@ -157,7 +157,7 @@ func buildssa(fn *Node) *ssa.Func {
for _, n := range fn.Func.Dcl { for _, n := range fn.Func.Dcl {
switch n.Class { switch n.Class {
case PPARAM, PPARAMOUT: 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) s.decladdrs[n] = s.entryNewValue1A(ssa.OpAddr, types.NewPtr(n.Type), aux, s.sp)
if n.Class == PPARAMOUT && s.canSSA(n) { if n.Class == PPARAMOUT && s.canSSA(n) {
// Save ssa-able PPARAMOUT variables so we can // Save ssa-able PPARAMOUT variables so we can
...@@ -3212,18 +3212,18 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value { ...@@ -3212,18 +3212,18 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value {
} }
if n == nodfp { if n == nodfp {
// Special arg that points to the frame pointer (Used by ORECOVER). // 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) return s.entryNewValue1A(ssa.OpAddr, t, aux, s.sp)
} }
s.Fatalf("addr of undeclared ONAME %v. declared: %v", n, s.decladdrs) s.Fatalf("addr of undeclared ONAME %v. declared: %v", n, s.decladdrs)
return nil return nil
case PAUTO: 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) return s.newValue1A(ssa.OpAddr, t, aux, s.sp)
case PPARAMOUT: // Same as PAUTO -- cannot generate LEA early. case PPARAMOUT: // Same as PAUTO -- cannot generate LEA early.
// ensure that we reuse symbols for out parameters so // ensure that we reuse symbols for out parameters so
// that cse works on their addresses // 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) return s.newValue1A(ssa.OpAddr, t, aux, s.sp)
default: default:
s.Fatalf("variable address class %v not implemented", classnames[n.Class]) s.Fatalf("variable address class %v not implemented", classnames[n.Class])
......
...@@ -246,14 +246,12 @@ type ExternSymbol struct { ...@@ -246,14 +246,12 @@ type ExternSymbol struct {
// ArgSymbol is an aux value that encodes an argument or result // ArgSymbol is an aux value that encodes an argument or result
// variable's constant offset from FP (FP = SP + framesize). // variable's constant offset from FP (FP = SP + framesize).
type ArgSymbol struct { type ArgSymbol struct {
Typ Type // Go type
Node GCNode // A *gc.Node referring to the argument/result variable. Node GCNode // A *gc.Node referring to the argument/result variable.
} }
// AutoSymbol is an aux value that encodes a local variable's // AutoSymbol is an aux value that encodes a local variable's
// constant offset from SP. // constant offset from SP.
type AutoSymbol struct { type AutoSymbol struct {
Typ Type // Go type
Node GCNode // A *gc.Node referring to a local (auto) variable. Node GCNode // A *gc.Node referring to a local (auto) variable.
} }
......
...@@ -265,7 +265,7 @@ func wbcall(pos src.XPos, b *Block, fn *obj.LSym, typ interface{}, ptr, val, mem ...@@ -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. // value we're trying to move.
t := val.Type.ElemType() t := val.Type.ElemType()
tmp = b.Func.fe.Auto(val.Pos, t) 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) mem = b.NewValue1A(pos, OpVarDef, TypeMem, tmp, mem)
tmpaddr := b.NewValue1A(pos, OpAddr, t.PtrTo(), aux, sp) tmpaddr := b.NewValue1A(pos, OpAddr, t.PtrTo(), aux, sp)
siz := t.Size() siz := t.Size()
......
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