src/map.c
static inline void update_map(Op* op) {
  int ii;

  ASSERT(map_data->proc_id, map_data->proc_id == op->proc_id);
  /* update the register map if the op produces a value */
  for(ii = 0; ii < op->table_info->num_dest_regs; ii++) {
    uns        id        = op->inst_info->dests[ii].id;
    uns        ind       = id << 1 | op->off_path;
    Map_Entry* map_entry = &map_data->reg_map[ind];

    DEBUG(map_data->proc_id,
          "Writing map  op_num:%s  off_path:%d  id:%d  flag:%d  ind:%d\n",
          unsstr64(op->op_num), op->off_path, id, map_data->map_flags[id], ind);

    map_entry->op           = op;
    map_entry->op_num       = op->op_num;
    map_entry->unique_num   = op->unique_num;
    map_data->map_flags[id] = op->off_path;
  }

  /* update the map if the op is a store */
  if(op->table_info->mem_type == MEM_ST) {
    uns        ind       = op->off_path;
    Map_Entry* map_entry = &map_data->last_store[ind];

    DEBUG(map_data->proc_id,
          "Writing store map  op_num:%s  off_path:%d  flag:%d  ind:%d\n",
          unsstr64(op->op_num), op->off_path, map_data->last_store_flag, ind);
    map_entry->op             = op;
    map_entry->op_num         = op->op_num;
    map_entry->unique_num     = op->unique_num;
    map_data->last_store_flag = op->off_path;
  }
}
/**************************************************************************************/
/* update_map: write the register map and the last store map if necessary */
write the register map and the last store map if necessary
write the register map and the last store map if necessary
static inline void update_map(Op* op) {
  int ii;
  ASSERT(map_data->proc_id, map_data->proc_id == op->proc_id);
  for(ii = 0; ii < op->table_info->num_dest_regs; ii++) {
    uns        id        = op->inst_info->dests[ii].id;
    uns        ind       = id << 1 | op->off_path;
    Map_Entry* map_entry = &map_data->reg_map[ind];
    DEBUG(map_data->proc_id,
          "Writing map  op_num:%s  off_path:%d  id:%d  flag:%d  ind:%d\n",
          unsstr64(op->op_num), op->off_path, id, map_data->map_flags[id], ind);
    map_entry->op           = op;
    map_entry->op_num       = op->op_num;
    map_entry->unique_num   = op->unique_num;
    map_data->map_flags[id] = op->off_path;
  }
  if(op->table_info->mem_type == MEM_ST) {
    uns        ind       = op->off_path;
    Map_Entry* map_entry = &map_data->last_store[ind];
    DEBUG(map_data->proc_id,
          "Writing store map  op_num:%s  off_path:%d  flag:%d  ind:%d\n",
          unsstr64(op->op_num), op->off_path, map_data->last_store_flag, ind);
    map_entry->op             = op;
    map_entry->op_num         = op->op_num;
    map_entry->unique_num     = op->unique_num;
    map_data->last_store_flag = op->off_path;
  }
}
static inline void update_map ( Op * op ) { int ii ; ASSERT ( map_data -> proc_id , map_data -> proc_id == op -> proc_id ) ; for ( ii = 0 ; ii < op -> table_info -> num_dest_regs ; ii ++ ) { uns id = op -> inst_info -> dests [ ii ] . id ; uns ind = id << 1 | op -> off_path ; Map_Entry * map_entry = & map_data -> reg_map [ ind ] ; DEBUG ( map_data -> proc_id , " \n " , unsstr64 ( op -> op_num ) , op -> off_path , id , map_data -> map_flags [ id ] , ind ) ; map_entry -> op = op ; map_entry -> op_num = op -> op_num ; map_entry -> unique_num = op -> unique_num ; map_data -> map_flags [ id ] = op -> off_path ; } if ( op -> table_info -> mem_type == MEM_ST ) { uns ind = op -> off_path ; Map_Entry * map_entry = & map_data -> last_store [ ind ] ; DEBUG ( map_data -> proc_id , " \n " , unsstr64 ( op -> op_num ) , op -> off_path , map_data -> last_store_flag , ind ) ; map_entry -> op = op ; map_entry -> op_num = op -> op_num ; map_entry -> unique_num = op -> unique_num ; map_data -> last_store_flag = op -> off_path ; } }
update_map: write the register map and the last store map if necessary
update_map : write the register map and the last store map if necessary
/* update the register map if the op produces a value */ /* update the map if the op is a store */