X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=funcnode.h;h=6ddcbb26d328859ddc2a8a42716ecee5ff935958;hp=03c92ef01a94f8b235257cc7c1f99924dda8c183;hb=a95ff96d0c30bc84c6e7757e346cd7b0b9ace03b;hpb=7c7aa0f18e3cbeef89019a152b635cc4f3f4a46f;ds=inline diff --git a/funcnode.h b/funcnode.h index 03c92ef0..6ddcbb26 100644 --- a/funcnode.h +++ b/funcnode.h @@ -3,19 +3,24 @@ class ModelAction; -typedef ModelList action_mlist_t; -typedef SnapList func_id_list_t; +typedef ModelList func_inst_list_t; class FuncInst { -public: +public: FuncInst(ModelAction *act); ~FuncInst(); - ModelAction * get_action() const { return action; } + //ModelAction * get_action() const { return action; } const char * get_position() const { return position; } + void * get_location() const { return location; } + action_type get_type() const { return type; } + + MEMALLOC private: - ModelAction * const action; + //ModelAction * const action; const char * position; + void *location; + action_type type; }; class FuncNode { @@ -23,8 +28,19 @@ public: FuncNode(); ~FuncNode(); - HashTable * getFuncInsts() { return &func_insts; } + void add_action(ModelAction *act); + + HashTable * getFuncInsts() { return &func_insts; } + func_inst_list_t * get_inst_list() { return &inst_list; } + + MEMALLOC private: - HashTable func_insts; -}; + /* Use source line number as the key of hashtable + * + * To do: cds_atomic_compare_exchange contains three atomic operations + * that are feeded with the same source line number by llvm pass + */ + HashTable func_insts; + func_inst_list_t inst_list; +};