8 #include <boost/shared_ptr.hpp>
36 typedef boost::shared_ptr<ReachingDef> ReachingDefPtr;
44 std::map<ReachingDefPtr, std::set<CFGEdge> > parentDefs;
67 const std::map<ReachingDefPtr, std::set<CFGEdge> >&
getJoinedDefs()
const;
Definition for the actual variable in question, not a parent or child.
bool isPhiFunction() const
Returns true if this is a phi function.
ReachingDef(const CFGNode &defNode, Type type)
Creates a new reaching def.
This is not a real definition; this variable is external to the scope being analyzed and this def rep...
const std::map< ReachingDefPtr, std::set< CFGEdge > > & getJoinedDefs() const
If this is a join node (phi function), get the definitions merged.
void setRenamingNumber(int n)
Set the renaming number (SSA index) of this def.
Definition for the parent or child of this variable.
void setDefinitionNode(CFGNode defNode)
Set the definition node in the AST (only valid if this is not a phi function)
void addJoinedDef(ReachingDefPtr newDef, CFGEdge edge)
Add a new join definition (only valid for phi functions).
bool isOriginalDef() const
Returns true if this is an original definition (i.e.
'Fake' definition that joins two different reaching definitions.
int getRenamingNumber() const
Get the renaming (SSA index) associated with this definition.
std::set< CFGNode > getActualDefinitions() const
Returns the actual reaching definitions at the current node, expanding all phi functions.
const CFGNode & getDefinitionNode() const
If this is not a phi function, returns the actual reaching definition.