From: weiyu Date: Wed, 31 Jul 2019 07:52:05 +0000 (-0700) Subject: merge X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6898da1b7c46ddf3427ea0127dc68f8cc6016511;p=c11tester.git merge --- 6898da1b7c46ddf3427ea0127dc68f8cc6016511 diff --cc funcnode.cc index abc94a5d,1c5d681c..1e08f1c5 --- a/funcnode.cc +++ b/funcnode.cc @@@ -166,14 -177,13 +176,14 @@@ void FuncNode::print_last_read(uint32_ { ASSERT(thrd_read_map.size() > tid); read_map_t * read_map = thrd_read_map[tid]; - +/* - ModelList::iterator it; - for (it = read_locations.begin();it != read_locations.end();it++) { - if ( !read_map->contains(*it) ) + mllnode * it; + for (it = read_locations.begin();it != NULL;it=it->getNext()) { + if ( !read_map->contains(it->getVal()) ) break; - uint64_t read_val = read_map->get(*it); - model_print("last read of thread %d at %p: 0x%x\n", tid, *it, read_val); + uint64_t read_val = read_map->get(it->getVal()); + model_print("last read of thread %d at %p: 0x%x\n", tid, it->getVal(), read_val); } +*/ } diff --cc funcnode.h index d2bc3cf2,ebd04c7f..f293f195 --- a/funcnode.h +++ b/funcnode.h @@@ -54,7 -53,7 +54,7 @@@ private /* Store the values read by atomic read actions per memory location for each thread */ ModelVector thrd_read_map; - ModelList read_locations; + }; - #endif /* __FUNCNODE_H__ */ + #endif /* __FUNCNODE_H__ */ diff --cc history.cc index a609fbf5,c4883534..5af063e3 --- a/history.cc +++ b/history.cc @@@ -181,11 -175,12 +184,11 @@@ void ModelHistory::print_func_node( func_inst_list_mt * entry_insts = func_node->get_entry_insts(); model_print("function %s has entry actions\n", func_node->get_func_name()); - func_inst_list_mt::iterator it; - for (it = entry_insts->begin();it != entry_insts->end();it++) { - FuncInst *inst = *it; + mllnode* it; + for (it = entry_insts->begin();it != NULL;it=it->getNext()) { + FuncInst *inst = it->getVal(); model_print("type: %d, at: %s\n", inst->get_type(), inst->get_position()); } - /* func_inst_list_mt * inst_list = funcNode->get_inst_list(); diff --cc history.h index f562c0f1,ee07f993..2edf12a8 --- a/history.h +++ b/history.h @@@ -45,9 -44,7 +45,9 @@@ private ModelVector func_map_rev; ModelVector func_nodes; + HashTable write_history; + HashSet write_locations; }; - #endif /* __HISTORY_H__ */ + #endif /* __HISTORY_H__ */ diff --cc predicate.h index 42511c60,bab7a7ee..3849e2d8 --- a/predicate.h +++ b/predicate.h @@@ -12,10 -5,10 +12,10 @@@ typedef enum predicate_token } token_t; /* If token is EQUALITY, then the predicate asserts whether - * this load should read the same value as the last value + * this load should read the same value as the last value * read at memory location specified in predicate_expr. */ -struct predicate_expr { +struct pred_expr { token_t token; void * location; bool value;