iree/vm/bytecode_dispatch.c
// Discards ref registers in the list if they are marked move.
// This can be used to eagerly release resources we don't need and reduces
// memory consumption if used effectively prior to yields/waits.
Discards ref registers in the list if they are marked move.
This can be used to eagerly release resources we don't need and reduces
memory consumption if used effectively prior to yields/waits.
Discards ref registers in the list if they are marked move . This can be used to eagerly release resources we don ' t need and reduces memory consumption if used effectively prior to yields / waits .
static void iree_vm_bytecode_dispatch_discard_registers(
    const iree_vm_registers_t regs, const iree_vm_register_list_t* reg_list) {
  for (int i = 0; i < reg_list->size; ++i) {
    uint16_t reg = reg_list->registers[i];
    if ((reg & (IREE_REF_REGISTER_TYPE_BIT | IREE_REF_REGISTER_MOVE_BIT)) ==
        (IREE_REF_REGISTER_TYPE_BIT | IREE_REF_REGISTER_MOVE_BIT)) {
      iree_vm_ref_release(&regs.ref[reg & regs.ref_mask]);
    }
  }
}
static void iree_vm_bytecode_dispatch_discard_registers ( const iree_vm_registers_t regs , const iree_vm_register_list_t * reg_list ) { for ( int i = 0 ; i < reg_list -> size ; ++ i ) { uint16_t reg = reg_list -> registers [ i ] ; if ( ( reg & ( IREE_REF_REGISTER_TYPE_BIT | IREE_REF_REGISTER_MOVE_BIT ) ) == ( IREE_REF_REGISTER_TYPE_BIT | IREE_REF_REGISTER_MOVE_BIT ) ) { iree_vm_ref_release ( & regs . ref [ reg & regs . ref_mask ] ) ; } } }
Discards ref registers in the list if they are marked move.
Discards ref registers in the list if they are marked move .
// TODO(benvanik): change encoding to avoid this branching.