7 #ifndef __DefUseAnalysis_HXX_LOADED__
8 #define __DefUseAnalysis_HXX_LOADED__
11 #include "filteredCFG.h"
19 #include <boost/unordered_map.hpp>
20 #include <boost/unordered_set.hpp>
27 template <>
struct hash <
SgNode*> {
28 size_t operator()(
SgNode*
const & n)
const {
31 size_t operator()(
SgNode*
const & n1,
SgNode*
const & n2)
const {
39 #include <ext/hash_map>
40 #include <ext/hash_set>
43 template <>
struct hash <
SgNode*> {
44 size_t operator()(
SgNode*
const & n)
const {
47 size_t operator()(
SgNode*
const & n1,
SgNode*
const & n2)
const {
69 typedef std::vector < std::pair<SgInitializedName* , SgNode*> >
multitype;
77 typedef hash_map< SgNode* , int >
convtype;
80 typedef rose_hash::unordered_map< SgNode* , int >
convtype;
84 void find_all_global_variables();
85 bool start_traversal_of_functions();
87 bool searchVizzMap(
SgNode* node);
88 std::string getInitName(
SgNode* sgNode);
110 DEBUG_MODE(false), DEBUG_MODE_EXTRA(false){
120 std::map< SgNode* , multitype >
getDefMap() {
return table;}
121 std::map< SgNode* , multitype >
getUseMap() {
return usetable;}
122 void setMaps(std::map< SgNode* , multitype > def,
123 std::map< SgNode* , multitype > use) {
133 std::vector < SgNode* > getAnyFor(
const multitype* mul,
SgInitializedName* initName);
137 std::vector <SgInitializedName*> getGlobalVariables();
142 bool searchMap(
SgNode* node);
145 void printMultiMap(
const multitype* type);
149 bool addID(
SgNode* sgNode);
166 globalVarList.clear();
178 visualizationEnabled=
false;