8#include <boost/shared_ptr.hpp>
12#include "dataflowCfgFilter.h"
31 typedef boost::shared_ptr<ReachingDef> ReachingDefPtr;
33 typedef FilteredCFGEdge<ssa_private::DataflowCfgFilter> FilteredCfgEdge;
41 std::map<ReachingDefPtr, std::set<FilteredCfgEdge> > parentDefs;
64 const std::map<ReachingDefPtr, std::set<FilteredCfgEdge> >&
getJoinedDefs()
const;
81 return defType == ORIGINAL_DEF;
bool isPhiFunction() const
Returns true if this is a phi function.
bool isOriginalDef() const
Returns true if this is an original definition (i.e.
int getRenamingNumber() const
Get the renaming (SSA index) associated with this definition.
void setDefinitionNode(SgNode *defNode)
Set the definition node in the AST (only valid if this is not a phi function)
std::set< SgNode * > getActualDefinitions() const
Returns the actual reaching definitions at the current node, expanding all phi functions.
@ ORIGINAL_DEF
Definition for the actual variable in question, not a parent or child.
@ PHI_FUNCTION
'Fake' definition that joins two different reaching definitions.
SgNode * getDefinitionNode() const
If this is not a phi function, returns the actual reaching definition.
const std::map< ReachingDefPtr, std::set< FilteredCfgEdge > > & getJoinedDefs() const
If this is a join node (phi function), get the definitions merged.
ReachingDef(SgNode *defNode, Type type)
Creates a new reaching def.
void setRenamingNumber(int n)
Set the renaming number (SSA index) of this def.
void addJoinedDef(ReachingDefPtr newDef, FilteredCfgEdge edge)
Add a new join definition (only valid for phi functions).
This class represents the base class for all IR nodes within Sage III.