1
0
mirror of https://github.com/golang/go synced 2024-11-05 15:56:12 -07:00

cmd/internal/obj: remove F3t field from Prog

F3t was effectively a local variable.
Remove it.

This shrinks obj.Prog from 456 to 448 bytes,
which places it in a smaller malloc class.

This reduces the memory usage of the compiler
while compiling the rotate tests by ~2.75%.

Change-Id: I31cc9dd67269851a430b56bcc7d255c9349eb522
Reviewed-on: https://go-review.googlesource.com/10255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-05-20 17:35:43 -07:00
parent 216e5c747d
commit 1378173785
2 changed files with 1 additions and 5 deletions

View File

@ -222,7 +222,6 @@ type Prog struct {
Scond uint8 Scond uint8
Back uint8 Back uint8
Ft uint8 Ft uint8
F3t uint8
Tt uint8 Tt uint8
Isize uint8 Isize uint8
Printed uint8 Printed uint8

View File

@ -2974,15 +2974,12 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
if p.Ft == 0 { if p.Ft == 0 {
p.Ft = uint8(oclass(ctxt, p, &p.From)) p.Ft = uint8(oclass(ctxt, p, &p.From))
} }
if p.F3t == 0 {
p.F3t = uint8(oclass(ctxt, p, &p.From3))
}
if p.Tt == 0 { if p.Tt == 0 {
p.Tt = uint8(oclass(ctxt, p, &p.To)) p.Tt = uint8(oclass(ctxt, p, &p.To))
} }
ft := int(p.Ft) * Ymax ft := int(p.Ft) * Ymax
f3t := int(p.F3t) * Ymax f3t := oclass(ctxt, p, &p.From3) * Ymax
tt := int(p.Tt) * Ymax tt := int(p.Tt) * Ymax
xo := obj.Bool2int(o.op[0] == 0x0f) xo := obj.Bool2int(o.op[0] == 0x0f)