src/memory/memory.c
static void unmark_l1_miss_deps(Op* op) {
  Wake_Up_Entry* temp;

  ASSERT(op->proc_id, op->engine_info.l1_miss_satisfied ||
                        (!op->engine_info.dep_on_l1_miss &&
                         op->engine_info.was_dep_on_l1_miss));

  /* Go thru the wake up list and unmark ops if they are not dependent on
   * another l1 miss */
  for(temp = op->wake_up_head; temp; temp = temp->next) {
    Op*     dep_op         = temp->op;
    Counter dep_unique_num = temp->unique_num;

    if(dep_op->unique_num == dep_unique_num && dep_op->op_pool_valid) {
      int      ii;
      Op_Info* op_info              = &dep_op->oracle_info;
      Flag     still_dep_on_l1_miss = FALSE;

      ASSERT(op->proc_id, op->proc_id == dep_op->proc_id);
      ASSERT(dep_op->proc_id, dep_op->engine_info.dep_on_l1_miss ||
                                dep_op->engine_info.was_dep_on_l1_miss);

      if(dep_op->engine_info.dep_on_l1_miss) {
        /* Determine if the op is dependent on another l1_miss */
        for(ii = 0; ii < op_info->num_srcs; ii++) {
          Src_Info* src_info = &op_info->src_info[ii];
          Op*       src_op   = src_info->op;

          if(src_op->unique_num == src_info->unique_num &&
             src_op->op_pool_valid) {
            if(src_op->unique_num != op->unique_num)
              if((src_op->engine_info.l1_miss &&
                  !src_op->engine_info.l1_miss_satisfied) ||
                 src_op->engine_info.dep_on_l1_miss)
                still_dep_on_l1_miss = TRUE;
          }
          if(still_dep_on_l1_miss)
            break;
        }

        /* If the op is not dependent on another l1 miss, then go ahead and
           unmark it and figure out if we need to unmark its dependents */
        if(!still_dep_on_l1_miss) {
          dep_op->engine_info.dep_on_l1_miss     = FALSE;
          dep_op->engine_info.was_dep_on_l1_miss = TRUE;
          unmark_l1_miss_deps(dep_op);
        }
      }
    }
  }
}
/**************************************************************************************/
/* unmark_l1_miss_deps: */
/* recursively go through the wake up lists of the op and unmark ops as
 * l1_miss_dep */
recursively go through the wake up lists of the op and unmark ops as
l1_miss_dep
recursively go through the wake up lists of the op and unmark ops as l1_miss_dep
static void unmark_l1_miss_deps(Op* op) {
  Wake_Up_Entry* temp;
  ASSERT(op->proc_id, op->engine_info.l1_miss_satisfied ||
                        (!op->engine_info.dep_on_l1_miss &&
                         op->engine_info.was_dep_on_l1_miss));
  for(temp = op->wake_up_head; temp; temp = temp->next) {
    Op*     dep_op         = temp->op;
    Counter dep_unique_num = temp->unique_num;
    if(dep_op->unique_num == dep_unique_num && dep_op->op_pool_valid) {
      int      ii;
      Op_Info* op_info              = &dep_op->oracle_info;
      Flag     still_dep_on_l1_miss = FALSE;
      ASSERT(op->proc_id, op->proc_id == dep_op->proc_id);
      ASSERT(dep_op->proc_id, dep_op->engine_info.dep_on_l1_miss ||
                                dep_op->engine_info.was_dep_on_l1_miss);
      if(dep_op->engine_info.dep_on_l1_miss) {
        for(ii = 0; ii < op_info->num_srcs; ii++) {
          Src_Info* src_info = &op_info->src_info[ii];
          Op*       src_op   = src_info->op;
          if(src_op->unique_num == src_info->unique_num &&
             src_op->op_pool_valid) {
            if(src_op->unique_num != op->unique_num)
              if((src_op->engine_info.l1_miss &&
                  !src_op->engine_info.l1_miss_satisfied) ||
                 src_op->engine_info.dep_on_l1_miss)
                still_dep_on_l1_miss = TRUE;
          }
          if(still_dep_on_l1_miss)
            break;
        }
        if(!still_dep_on_l1_miss) {
          dep_op->engine_info.dep_on_l1_miss     = FALSE;
          dep_op->engine_info.was_dep_on_l1_miss = TRUE;
          unmark_l1_miss_deps(dep_op);
        }
      }
    }
  }
}
static void unmark_l1_miss_deps ( Op * op ) { Wake_Up_Entry * temp ; ASSERT ( op -> proc_id , op -> engine_info . l1_miss_satisfied || ( ! op -> engine_info . dep_on_l1_miss && op -> engine_info . was_dep_on_l1_miss ) ) ; for ( temp = op -> wake_up_head ; temp ; temp = temp -> next ) { Op * dep_op = temp -> op ; Counter dep_unique_num = temp -> unique_num ; if ( dep_op -> unique_num == dep_unique_num && dep_op -> op_pool_valid ) { int ii ; Op_Info * op_info = & dep_op -> oracle_info ; Flag still_dep_on_l1_miss = FALSE ; ASSERT ( op -> proc_id , op -> proc_id == dep_op -> proc_id ) ; ASSERT ( dep_op -> proc_id , dep_op -> engine_info . dep_on_l1_miss || dep_op -> engine_info . was_dep_on_l1_miss ) ; if ( dep_op -> engine_info . dep_on_l1_miss ) { for ( ii = 0 ; ii < op_info -> num_srcs ; ii ++ ) { Src_Info * src_info = & op_info -> src_info [ ii ] ; Op * src_op = src_info -> op ; if ( src_op -> unique_num == src_info -> unique_num && src_op -> op_pool_valid ) { if ( src_op -> unique_num != op -> unique_num ) if ( ( src_op -> engine_info . l1_miss && ! src_op -> engine_info . l1_miss_satisfied ) || src_op -> engine_info . dep_on_l1_miss ) still_dep_on_l1_miss = TRUE ; } if ( still_dep_on_l1_miss ) break ; } if ( ! still_dep_on_l1_miss ) { dep_op -> engine_info . dep_on_l1_miss = FALSE ; dep_op -> engine_info . was_dep_on_l1_miss = TRUE ; unmark_l1_miss_deps ( dep_op ) ; } } } } }
unmark_l1_miss_deps:
recursively go through the wake up lists of the op and unmark ops as
 l1_miss_dep
unmark_l1_miss_deps : recursively go through the wake up lists of the op and unmark ops as l1_miss_dep
/* Go thru the wake up list and unmark ops if they are not dependent on
   * another l1 miss */ /* Determine if the op is dependent on another l1_miss */ /* If the op is not dependent on another l1 miss, then go ahead and
           unmark it and figure out if we need to unmark its dependents */