run tabbing pass
[c11tester.git] / funcnode.h
index 3d3aaa4c852cbb8d044b8750acef7316553d2bc5..c8c76ba7f8695bdf084e0c189aae910924e8e271 100644 (file)
@@ -18,27 +18,32 @@ public:
 
        FuncInst * get_or_add_action(ModelAction *act);
 
-       HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncInsts() { return &func_insts; }
+       HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> * getFuncInstMap() { return &func_inst_map; }
        func_inst_list_mt * get_inst_list() { return &inst_list; }
        func_inst_list_mt * get_entry_insts() { return &entry_insts; }
        void add_entry_inst(FuncInst * inst);
 
+       void group_reads_by_loc(FuncInst * inst);
+
        MEMALLOC
 private:
        uint32_t func_id;
        const char * func_name;
 
-       /* Use source line number as the key of hashtable, to check if 
+       /* Use source line number as the key of hashtable, to check if
         * atomic operation with this line number has been added or not
         *
         * To do: cds_atomic_compare_exchange contains three atomic operations
         * that are feeded with the same source line number by llvm pass
         */
-       HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> func_insts;
+       HashTable<const char *, FuncInst *, uintptr_t, 4, model_malloc, model_calloc, model_free> func_inst_map;
 
-       /* list of all atomic instructions in this function */
+       /* list of all atomic actions in this function */
        func_inst_list_mt inst_list;
 
-       /* possible entry atomic instructions in this function */
+       /* possible entry atomic actions in this function */
        func_inst_list_mt entry_insts;
+
+       /* group atomic read actions by memory location */
+       HashTable<void *, func_inst_list_mt *, uintptr_t, 4, model_malloc, model_calloc, model_free> reads_by_loc;
 };