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