Fix a bug
authorweiyu <weiyuluo1232@gmail.com>
Thu, 26 Sep 2019 19:52:24 +0000 (12:52 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Thu, 26 Sep 2019 19:52:24 +0000 (12:52 -0700)
funcnode.cc

index 3db022695ece62edb0e775f7ea1746fc1b83319c..5b5b911436d37565b7d7913dc341471f17692397 100644 (file)
@@ -291,12 +291,15 @@ void FuncNode::update_predicate_tree(action_list_t * act_list)
                if (next_act->is_write())
                        curr_pred->set_write(true);
 
                if (next_act->is_write())
                        curr_pred->set_write(true);
 
+               if (next_act->is_read()) {
+                       loc_act_map.put(next_act->get_location(), next_act);
+                       inst_act_map.put(next_inst, next_act);
+               }
+
                inst_pred_map.put(next_inst, curr_pred);
                if (!inst_id_map.contains(next_inst))
                        inst_id_map.put(next_inst, inst_counter++);
 
                inst_pred_map.put(next_inst, curr_pred);
                if (!inst_id_map.contains(next_inst))
                        inst_id_map.put(next_inst, inst_counter++);
 
-               loc_act_map.put(next_act->get_location(), next_act);
-               inst_act_map.put(next_inst, next_act);
                it = it->getNext();
        }
 }
                it = it->getNext();
        }
 }