• David Chase's avatar
    cmd/compile: repair name propagation into aggregate parts · 38c725b1
    David Chase authored
    For structs, slices, strings, interfaces, etc, propagation of
    names to their components (e.g., complex.real, complex.imag)
    is fragile (depends on phase ordering) and not done right
    for the "dec" pass.
    
    The dec pass is subsumed into decomposeBuiltin,
    and then names are pushed into the args of all
    OpFooMake opcodes.
    
    compile/ssa/debug_test.go was fixed to pay attention to
    variable values, and the reference files include checks
    for the fixes in this CL (which make debugging better).
    
    Change-Id: Ic2591ebb1698d78d07292b92c53667e6c37fa0cd
    Reviewed-on: https://go-review.googlesource.com/73210
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
    38c725b1
opt.go 290 Bytes