• A
    tcg: rewrite tcg_reg_alloc_mov() · c29c1d7e
    Aurelien Jarno 提交于
    Now that the liveness analysis provides more information, rewrite
    tcg_reg_alloc_mov(). This changes the behaviour about propagating
    constants and memory accesses. We now take the assumption that once
    a value is loaded into a register (from memory or from a constant),
    it's better to keep it there than to reload it later. This assumption
    is now always almost correct given that we are now sure the
    corresponding temp is going to be used later (otherwise it would have
    been synchronized and marked as dead already). The assumption is wrong
    if one of the op after clobbers some registers including the one
    of the holding the temp (this can be avoided by allocating clobbered
    registers last, which is what most TCG target do), or in case of lack
    of available register.
    Reviewed-by: NRichard Henderson <rth@twiddle.net>
    Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
    c29c1d7e
tcg.c 80.2 KB