8 #include <uniqueNameTraversal.h>
10 #include <virtualCFG.h>
23 std::set<SgVarRefExp*> uses;
59 void setUses(
const std::set<SgVarRefExp*>& newUses)
77 typedef std::map<CFGNode, std::set<ssa_private::UniqueNameTraversal::VarName> > CFGNodeToVarsMap;
82 std::map<
SgNode*, std::set<SgVarRefExp*> >& uses);
86 CFGNodeToVarsMap cfgNodeToDefinedVars;
89 std::map<SgNode*, std::set<SgVarRefExp*> > astNodeToUsedVars;
106 void addUsesToNode(
SgNode* node, std::set<SgVarRefExp*> uses);
109 void addDefForVarAtNode(
SgVarRefExp* var,
const CFGNode& node);
Attribute Evaluator for synthesized attributes.
This class collects all the defs and uses associated with each node in the traversed CFG...
Attribute that describes the variables used by a given expression.
ChildUses()
Create the attribute with no refs.
This class represents the base class for all IR nodes within Sage III.
void setUses(const std::set< SgVarRefExp * > &newUses)
Set the uses for this node and below.
virtual ChildUses evaluateSynthesizedAttribute(SgNode *node, SynthesizedAttributesList attrs)
Called to evaluate the synthesized attribute on every node.
This class represents the variable refernece in expressions.
std::set< SgVarRefExp * > & getUses()
Get the uses for this node and below.
static void CollectDefsAndUses(SgNode *traversalRoot, CFGNodeToVarsMap &defs, std::map< SgNode *, std::set< SgVarRefExp * > > &uses)
Call this method to collect defs and uses for a subtree.
ChildUses(const std::set< SgVarRefExp * > &useTree, SgVarRefExp *var=NULL)
Create the attribute with the def and list of uses.