• Josh Bleecher Snyder's avatar
    cmd/compile: make rulegen magic variable prediction more precise · 53948127
    Josh Bleecher Snyder authored
    The sheer length of the generated rules files makes my
    editor and git client unhappy.
    This change is a small step towards shortening them.
    
    We recognize a few magic variables during rulegen: b, config, fe, typ.
    Of these, only b appears prone to false positives.
    By tightening the heuristic and fixing one case in MIPS.rules,
    we can make the heuristic enough that it has no failures.
    That allows us to remove the hedge assignments to _,
    removing 3000 pointless lines of code.
    
    Change-Id: I080cde5db28c8277cb3fd9ddcd829306c9a27785
    Reviewed-on: https://go-review.googlesource.com/c/go/+/166979
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
    53948127
rewriteMIPS.go 206 KB