ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VariableRenaming::DefsAndUsesTraversal Class Reference

This class collects all the defs and uses associated with each node in the traversed CFG. More...

Inheritance diagram for VariableRenaming::DefsAndUsesTraversal:
Collaboration diagram for VariableRenaming::DefsAndUsesTraversal:

Public Member Functions

 DefsAndUsesTraversal (VariableRenaming *ssa)
 
virtual ChildUses evaluateSynthesizedAttribute (SgNode *node, SynthesizedAttributesList attrs)
 Called to evaluate the synthesized attribute on every node. More...
 
- Public Member Functions inherited from AstBottomUpProcessing< ChildUses >
ChildUses traverse (SgNode *node)
 evaluates attributes on the entire AST More...
 
ChildUses traverseWithinFile (SgNode *node)
 evaluates attributes only at nodes which represent the same file as where the evaluation was started More...
 
void traverseInputFiles (SgProject *projectNode)
 evaluates attributes only at nodes which represent files which were specified on the command line (=input files). More...
 
- Public Member Functions inherited from SgTreeTraversal< DummyAttribute, ChildUses >
ChildUses traverse (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
ChildUses traverseWithinFile (SgNode *basenode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
void traverseInputFiles (SgProject *projectNode, DummyAttributeinheritedValue, t_traverseOrder travOrder=preandpostorder)
 
virtual ~SgTreeTraversal ()
 
 SgTreeTraversal ()
 
 SgTreeTraversal (const SgTreeTraversal &)
 
const SgTreeTraversaloperator= (const SgTreeTraversal &)
 

Private Member Functions

void addUsesToNode (SgNode *node, std::vector< SgNode * > uses)
 Mark all the uses as occurring at the specified node. More...
 
void addDefForVarAtNode (SgVarRefExp *currentVar, SgNode *defNode)
 Mark the given variable as being defined at the node. More...
 

Private Attributes

VariableRenamingssa
 

Additional Inherited Members

- Public Types inherited from AstBottomUpProcessing< ChildUses >
typedef SgTreeTraversal
< DummyAttribute, ChildUses >
::SynthesizedAttributesList 
SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Protected Types inherited from SgTreeTraversal< DummyAttribute, ChildUses >
typedef
AstSuccessorsSelectors::SuccessorsContainer 
SuccessorsContainer
 
typedef SuccessorsContainerSuccessorsContainerRef
 
- Protected Member Functions inherited from AstBottomUpProcessing< ChildUses >
virtual ChildUses defaultSynthesizedAttribute ()
 Allows to provide a default value for a synthesized attribute of primitive type (e.g. More...
 
virtual void atTraversalStart ()
 Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op. More...
 
virtual void atTraversalEnd ()
 

Detailed Description

This class collects all the defs and uses associated with each node in the traversed CFG.

Note that this does not compute reachability information; it just records each instance of a variable used or defined.

Definition at line 990 of file VariableRenaming.h.

Constructor & Destructor Documentation

VariableRenaming::DefsAndUsesTraversal::DefsAndUsesTraversal ( VariableRenaming ssa)
inline

Definition at line 996 of file VariableRenaming.h.

Member Function Documentation

virtual ChildUses VariableRenaming::DefsAndUsesTraversal::evaluateSynthesizedAttribute ( SgNode node,
SynthesizedAttributesList  attrs 
)
virtual

Called to evaluate the synthesized attribute on every node.

This function will handle passing all variables that are defined and used by a given operation.

Parameters
nodeThe node being evaluated.
attrThe attributes from the child nodes.
Returns
The attribute at this node.

Implements AstBottomUpProcessing< ChildUses >.

void VariableRenaming::DefsAndUsesTraversal::addUsesToNode ( SgNode node,
std::vector< SgNode * >  uses 
)
private

Mark all the uses as occurring at the specified node.

void VariableRenaming::DefsAndUsesTraversal::addDefForVarAtNode ( SgVarRefExp currentVar,
SgNode defNode 
)
private

Mark the given variable as being defined at the node.

Member Data Documentation

VariableRenaming* VariableRenaming::DefsAndUsesTraversal::ssa
private

Definition at line 992 of file VariableRenaming.h.


The documentation for this class was generated from the following file: