]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: remove F3t field from Prog
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 21 May 2015 00:35:43 +0000 (17:35 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 21 May 2015 18:28:50 +0000 (18:28 +0000)
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>
src/cmd/internal/obj/link.go
src/cmd/internal/obj/x86/asm6.go

index 9f5e87b4c3550f5800e5a8ffb21818a7adcd3e35..b0c7a55ca17585f072510f5f8aaa68ab7e2cb704 100644 (file)
@@ -222,7 +222,6 @@ type Prog struct {
        Scond    uint8
        Back     uint8
        Ft       uint8
-       F3t      uint8
        Tt       uint8
        Isize    uint8
        Printed  uint8
index 0c0cc0454853001f714aff513ac4827ce89d460d..2b9c2670df732394941146519b6400b7e9c0df23 100644 (file)
@@ -2974,15 +2974,12 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
        if p.Ft == 0 {
                p.Ft = uint8(oclass(ctxt, p, &p.From))
        }
-       if p.F3t == 0 {
-               p.F3t = uint8(oclass(ctxt, p, &p.From3))
-       }
        if p.Tt == 0 {
                p.Tt = uint8(oclass(ctxt, p, &p.To))
        }
 
        ft := int(p.Ft) * Ymax
-       f3t := int(p.F3t) * Ymax
+       f3t := oclass(ctxt, p, &p.From3) * Ymax
        tt := int(p.Tt) * Ymax
 
        xo := obj.Bool2int(o.op[0] == 0x0f)