• danno's avatar
    [turbofan] Create ExplicitOperands to specify operands without virtual registers · f1aa5562
    danno authored
    Up until now, if one wanted to specify an explicit stack location                                                                                                                                                                                                or register as an operand for an instruction, it had to also be
    explicitly associated with a virtual register as a so-called
    FixedRegister or FixedStackSlot.
    
    For the implementation of tail calls, the plan is to use the gap
    resolver needs to shuffle stack locations from the caller to the
    tail-called callee. In order to do this, it must be possible to
    explicitly address operand locations on the stack that are not
    associated with virtual registers.
    
    This CL introduces ExplictOperands, which can specify a specific
    register or stack location that is not associated with virtual
    register. This will allow tail calls to specify the target
    locations for the necessary stack moves in the gap for the tail
    call without the core register allocation having to know about
    the target of the stack moves at all.
    
    In the process this CL:
    * creates a new Operand kind, ExplicitOperand, with which
      instructions can specify register and stack slots without an
      associated virtual register.
    * creates a LocationOperand class from which AllocatedOperand and
      ExplicitOperand are derived and provides a common interface to
      get Register, DoubleRegister and spill slot information.
    * removes RegisterOperand, DoubleRegisterOperand,
      StackSlotOperand and DoubleStackSlotOperand, they are subsumed
      by LocationOperand.
    * addresses a cleanup TODO in AllocatedOperand to reduce the
      redundancy of AllocatedOperand::Kind by using machine_type() to
      determine if an operand corresponds to a general purpose or
      double register.
    
    BUG=v8:4076
    LOG=n
    
    Review URL: https://codereview.chromium.org/1389373002
    
    Cr-Commit-Position: refs/heads/master@{#31603}
    f1aa5562
test-jump-threading.cc 15.3 KB