+
+ if (curr_pred != NULL) {
+ Predicate * selected_branch = NULL;
+
+ if (check_branch_inst(curr_pred, read_inst, inst_act_map, rf_set))
+ selected_branch = selectBranch(tid, curr_pred, read_inst);
+ else {
+ // no child of curr_pred matches read_inst, check back edges
+ PredSet * back_edges = curr_pred->get_backedges();
+ PredSetIter * it = back_edges->iterator();
+
+ while (it->hasNext()) {
+ curr_pred = it->next();
+ if (check_branch_inst(curr_pred, read_inst, inst_act_map, rf_set)) {
+ selected_branch = selectBranch(tid, curr_pred, read_inst);
+ break;
+ }
+ }
+
+ delete it;
+ }
+
+ prune_writes(tid, selected_branch, rf_set, inst_act_map);
+ }
+
+ if (!failed_predicates.isEmpty())
+ failed_predicates.reset();
+
+ thrd_last_read_act[thread_id] = read;
+ thrd_last_func_inst[thread_id] = read_inst;