• Matthew Dempsky's avatar
    cmd/compile: remove pointer temporaries in walkcompare · e76b9e89
    Matthew Dempsky authored
    When comparing two T-typed values t1 and t2 using the T_eq function,
    we used to generate:
    
        pl := &t1
        pr := &t2
        return T_eq(pl, pr, unsafe.Sizeof(T{}))
    
    This CL changes it to simply generate:
    
        return T_eq(&t1, &t2, unsafe.Sizeof(T{}))
    
    Surprisingly, this does not pass toolstash. For some reason, it seems
    like SSA wasn't able to SSA-ify the pl and pr variables in all cases.
    
    Change-Id: I111fbb068a1741fa169c9922cb8cdb6e21579aa4
    Reviewed-on: https://go-review.googlesource.com/c/go/+/197601
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    e76b9e89
walk.go 96.3 KB