• epertoso's avatar
    Emit memory operands for cmp and test on ia32 and x64 when it makes sense. · 0e43ff56
    epertoso authored
    The InstructionSelector now associates an effect level to every node in a block.
    
    The effect level of a node is the number of non-eliminatable nodes encountered from the beginning of the block to the node itself.
    
    With this change, on ia32 and x64, a load from memory into a register can be replaced by a memory operand if all of the following conditions hold:
    
    1. The only use of the load is in a 32 or 64 bit word comparison.
    2. The user node and the load node belong to the same block.
    3. The values of the operands have the same size (i.e., no need to zero-extend or sign-extend the result of the load).
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1706763002
    
    Cr-Commit-Position: refs/heads/master@{#34187}
    0e43ff56
disasm-ia32.cc 69.7 KB