• Austin Clements's avatar
    cmd/compile: don't lower OpConvert · 8871c930
    Austin Clements authored
    Currently, each architecture lowers OpConvert to an arch-specific
    OpXXXconvert. This is silly because OpConvert means the same thing on
    all architectures and is logically a no-op that exists only to keep
    track of conversions to and from unsafe.Pointer. Furthermore, lowering
    it makes it harder to recognize in other analyses, particularly
    liveness analysis.
    
    This CL eliminates the lowering of OpConvert, leaving it as the
    generic op until code generation time.
    
    The main complexity here is that we still need to register-allocate
    OpConvert operations. Currently, each arch's lowered OpConvert
    specifies all GP registers in its register mask. Ideally, OpConvert
    wouldn't affect value homing at all, and we could just copy the home
    of OpConvert's source, but this can potentially home an OpConvert in a
    LocalSlot, which neither regalloc nor stackalloc expect. Rather than
    try to disentangle this assumption from regalloc and stackalloc, we
    continue to register-allocate OpConvert, but teach regalloc that
    OpConvert can be allocated to any allocatable GP register.
    
    For #24543.
    
    Change-Id: I795a6aee5fd94d4444a7bafac3838a400c9f7bb6
    Reviewed-on: https://go-review.googlesource.com/108496
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    8871c930
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...