• jacob.bramley's avatar
    Improve phi hinting heuristics. · 2e360cd8
    jacob.bramley authored
    The basic intention is to try to remove unnecessary moves caused by
    hints in otherwise empty blocks. Roughly:
    
    Before                          After
    -----------------------------------------------------------
    B0: add   x1, ...               B0: add   x1, ...
        b.ne  B2                        b.eq  B3
    B1: mov   x0, x1                B1: [empty]
        b     B3
    B2: add   x0, x1, ...           B2: add   x1, x1, ...
    B3: phi(B1,B2) in x0            B3: phi(B0,B1) in x1
    
    Hinting is also improved in cases where one of the inputs is already
    allocated. This occurs commonly on architectures with instructions which
    write into fixed registers, for example.
    
    BUG=
    
    Review-Url: https://chromiumcodereview.appspot.com/2125463002
    Cr-Commit-Position: refs/heads/master@{#40498}
    2e360cd8
register-allocator.cc 135 KB