00001 #ifndef MAPPED_VARIABLE_H_INCLUDED_ 00002 #define MAPPED_VARIABLE_H_INCLUDED_ 00003 00004 #include "rose.h" 00005 00006 #include<list> 00007 00008 namespace risc { 00009 00010 namespace sg { 00011 00022 struct MappedVariable { 00023 00024 MappedVariable(SgVariableSymbol* symbol, int instance_id); 00025 00026 MappedVariable(); 00027 00028 bool is_valid(); 00029 00030 bool operator==(const MappedVariable &ohs); 00031 00032 bool operator!=(const MappedVariable &ohs); 00033 00034 SgVariableSymbol* symbol_; 00035 int instance_id_; 00036 00037 static int const InvalidVariable; 00038 }; 00039 00040 typedef std::list<MappedVariable> MappedVariableList; 00041 00042 const bool operator<(const MappedVariable &lhs, const MappedVariable &rhs); 00043 00044 struct Conflict { 00045 00046 SgNode *node_; 00047 MappedVariable variable_; 00048 00049 Conflict(SgNode *node); 00050 00051 Conflict(MappedVariable variable); 00052 }; 00053 00059 void reset_inst_id_for_channels(MappedVariableList &mapped_variables); 00060 00061 const bool operator<(const Conflict &lhs, const Conflict &rhs); 00062 00063 }; // end of namesapce sg 00064 00065 }; // end of namespace risc 00066 00067 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */ 00068 00069 #endif /* MAPPED_VARIABLE_H_INCLUDED_ */