reachingDefUnfilteredCfg.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <boost/shared_ptr.hpp>
00004 #include <map>
00005 #include <set>
00006 #include <rose.h>
00007 
00008 namespace ssa_unfiltered_cfg
00009 {
00010 
00011     class ReachingDef
00012     {
00013     public:
00014 
00015         enum Type
00016         {
00018             PHI_FUNCTION,
00019 
00021             ORIGINAL_DEF,
00022 
00025             EXPANDED_DEF,
00026 
00029             EXTERNAL_DEF
00030         };
00031 
00032         typedef boost::shared_ptr<ReachingDef> ReachingDefPtr;
00033 
00034     private:
00036         Type defType;
00037 
00040         std::map<ReachingDefPtr, std::set<CFGEdge> > parentDefs;
00041 
00044         CFGNode thisNode;
00045 
00047         int renamingNumer;
00048 
00049     public:
00050 
00051         //---------CONSTRUCTORS---------
00052 
00054         ReachingDef(const CFGNode& defNode, Type type);
00055 
00056         //---------ACCESSORS---------
00057 
00059         bool isPhiFunction() const;
00060 
00063         const std::map<ReachingDefPtr, std::set<CFGEdge> >& getJoinedDefs() const;
00064 
00067         const CFGNode& getDefinitionNode() const;
00068 
00070         std::set<CFGNode> getActualDefinitions() const;
00071 
00074         int getRenamingNumber() const;
00075 
00078         bool isOriginalDef() const
00079         {
00080             return defType == ORIGINAL_DEF;
00081         }
00082 
00083         bool operator==(const ReachingDef& other) const;
00084 
00085         Type getType() const
00086         {
00087             return defType;
00088         }
00089 
00090         //---------MODIFIERS---------
00091 
00093         void setDefinitionNode(CFGNode defNode);
00094 
00096         void addJoinedDef(ReachingDefPtr newDef, CFGEdge edge);
00097 
00099         void setRenamingNumber(int n);
00100 
00101         void setType(Type t)
00102         {
00103             defType = t;
00104         }
00105     };
00106 
00107 }

Generated on Sat May 19 00:53:06 2012 for ROSE by  doxygen 1.4.7