8#include <uniqueNameTraversal.h>
10#include <virtualCFG.h>
12namespace ssa_unfiltered_cfg
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 represents the base class for all IR nodes within Sage III.
This class represents the variable refernece in expressions.
Attribute that describes the variables used by a given expression.
ChildUses()
Create the attribute with no refs.
ChildUses(const std::set< SgVarRefExp * > &useTree, SgVarRefExp *var=NULL)
Create the attribute with the def and list of uses.
std::set< SgVarRefExp * > & getUses()
Get the uses for this node and below.
void setUses(const std::set< SgVarRefExp * > &newUses)
Set the uses for this node and below.
This class collects all the defs and uses associated with each node in the traversed CFG.
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.
virtual ChildUses evaluateSynthesizedAttribute(SgNode *node, SynthesizedAttributesList attrs)
Called to evaluate the synthesized attribute on every node.