• Keith Randall's avatar
    cmd/compile: allow naming of subexpressions · 259b7edf
    Keith Randall authored
    Allow names to be used for subexpressions of match rules.
    For example:
    
    (OpA x:(OpB y)) -> ..use x here to refer to the OpB value..
    
    This gets rid of the .Args[0].Args[0]... way of naming we
    used to use.
    
    While we're here, give all subexpression matches names instead
    of recomputing them with .Args[i] sequences each time they
    are referenced.  Makes the generated rule code a bit smaller.
    
    Change-Id: Ie42139f6f208933b75bd2ae8bd34e95419bc0e4e
    Reviewed-on: https://go-review.googlesource.com/20997
    Run-TryBot: Todd Neal <todd@tneal.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarTodd Neal <todd@tneal.org>
    259b7edf
rewriteAMD64.go 329 KB