00001 #ifndef DATA_CONFLICT_TABLE_H_INCLUDED_
00002 #define DATA_CONFLICT_TABLE_H_INCLUDED_
00003 
00004 #include<vector>
00005 #include<utility>
00006 
00007 #include "rose.h"
00008 
00009 #include "segment_graph.h" 
00010 #include "conflict_table.h"
00011 #include "mapped_variable.h" 
00012 #include "data_conflict_ast_attributes.h" 
00013 
00014 namespace risc {
00015 
00016 namespace sg {
00017 
00025 class DataConflictTable: public ConflictTable {
00026 
00027 public:
00028 
00032   DataConflictTable(
00033       SegmentGraph &graph,
00034       PathInstanceMapper *path_instance_mapper,
00035       bool debugging);
00036 
00041   virtual void determine_conflict_table();
00042 
00049   void
00050   color_members_of_class(const MappedVariable &variable,
00051       DataConflictAstAttributes::Status color);
00052 
00059   void uncolor_members_of_class(SgVariableSymbol *var_symbol, int instance_id);
00060 
00067   bool check_members_of_class(const MappedVariable &mapped_variable,
00068            DataConflictAstAttributes::Status color,
00069            std::set<Conflict> &conflicts);
00070 
00077   bool
00078   data_conflict_between(
00079       VertexDescriptor first,
00080       VertexDescriptor second,
00081       int row, int column,
00082       int inst_id_first, int inst_id_second,
00083       bool dynamic_analysis);
00084 
00091   bool is_conflict_free_variable(SgVariableSymbol *symbol);
00092 };
00093 
00094 
00095 }; 
00096 
00097 }; 
00098 
00099 #endif 
00100 
00101