• Keith Randall's avatar
    [dev.ssa] cmd/internal/gc: convert standard IR into SSA. · d2fd43aa
    Keith Randall authored
    Hook into the current compiler to convert the existing
    IR (after walk) into SSA.  Any function ending in "_ssa"
    will take this path.  The resulting assembly is printed
    and then discarded.
    
    Use gc.Type directly in ssa instead of a wrapper for go types.
    It makes the IR->SSA rewrite a lot simpler.
    
    Only a few opcodes are implemented in this change.  It is
    enough to compile simple examples like
        func f(p *int) int { return *p }
        func g(a []int, i int) int { return a[i] }
    
    Change-Id: I5e18841b752a83ca0519aa1b2d36ef02ce1de6f9
    Reviewed-on: https://go-review.googlesource.com/8971Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
    d2fd43aa
main.go 11.4 KB