6 typedef ModelList<FuncInst *> func_inst_list_t;
10 FuncInst(ModelAction *act);
13 //ModelAction * get_action() const { return action; }
14 const char * get_position() const { return position; }
15 void * get_location() const { return location; }
16 action_type get_type() const { return type; }
18 func_inst_list_t * get_collisions() { return &collisions; }
20 FuncInst * search_in_collision(ModelAction *act) {
21 action_type type = act->get_type();
23 func_inst_list_t::iterator it;
24 for (it = collisions.begin(); it != collisions.end(); it++) {
25 FuncInst * inst = *it;
26 if ( inst->get_type() == type )
34 //ModelAction * const action;
35 const char * position;
39 func_inst_list_t collisions;
47 void add_action(ModelAction *act);
49 HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncInsts() { return &func_insts; }
50 func_inst_list_t * get_inst_list() { return &inst_list; }
52 uint32_t get_func_id() { return func_id; }
53 const char * get_func_name() { return func_name; }
54 void set_func_id(uint32_t id) { func_id = id; }
55 void set_func_name(const char * name) { func_name = name; }
60 const char * func_name;
62 /* Use source line number as the key of hashtable, to check if
63 * atomic operation with this line number has been added or not
65 * To do: cds_atomic_compare_exchange contains three atomic operations
66 * that are feeded with the same source line number by llvm pass
68 HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> func_insts;
70 /* list of all atomic instructions in this function */
71 func_inst_list_t inst_list;
73 /* possible entry (atomic) instructions in this function */
74 func_inst_list_t entry_insts;