ROSE  0.11.96.11
Public Types | Public Member Functions | Static Public Attributes | List of all members
ssa_private::UniqueNameTraversal Class Reference

Description

Class to traverse the AST and assign unique names to every varRef.

Definition at line 154 of file uniqueNameTraversal.h.

#include <uniqueNameTraversal.h>

Inheritance diagram for ssa_private::UniqueNameTraversal:
Inheritance graph
[legend]
Collaboration diagram for ssa_private::UniqueNameTraversal:
Collaboration graph
[legend]

Public Types

typedef std::vector< SgInitializedName * > VarName
 A compound variable name as used by the variable renaming. More...
 
- Public Types inherited from AstBottomUpProcessing< VariableReferenceSet >
typedef SgTreeTraversal< DummyAttribute, VariableReferenceSet >::SynthesizedAttributesList SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Public Types inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet >
typedef StackFrameVector< VariableReferenceSet > SynthesizedAttributesList
 

Public Member Functions

 UniqueNameTraversal (const std::vector< SgInitializedName * > &allNames, bool treatPointersAsStructs=true, bool propagateNamesThroughComma=true)
 
virtual VariableReferenceSet evaluateSynthesizedAttribute (SgNode *node, SynthesizedAttributesList attrs)
 Called to evaluate the synthesized attribute on every node. More...
 
- Public Member Functions inherited from AstBottomUpProcessing< VariableReferenceSet >
VariableReferenceSet traverse (SgNode *node)
 evaluates attributes on the entire AST
 
VariableReferenceSet traverseWithinFile (SgNode *node)
 evaluates attributes only at nodes which represent the same file as where the evaluation was started
 
void traverseInputFiles (SgProject *projectNode)
 evaluates attributes only at nodes which represent files which were specified on the command line (=input files).
 
- Public Member Functions inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet >
VariableReferenceSet traverse (SgNode *basenode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
VariableReferenceSet traverseWithinFile (SgNode *basenode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
void traverseInputFiles (SgProject *projectNode, DummyAttribute inheritedValue, t_traverseOrder travOrder=preandpostorder)
 
 SgTreeTraversal (const SgTreeTraversal &)
 
const SgTreeTraversaloperator= (const SgTreeTraversal &)
 

Static Public Attributes

static std::string varKeyTag
 Tag to use to retrieve unique naming key from node. More...
 

Additional Inherited Members

- Protected Types inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet >
typedef AstSuccessorsSelectors::SuccessorsContainer SuccessorsContainer
 
typedef SuccessorsContainer & SuccessorsContainerRef
 
- Protected Member Functions inherited from AstBottomUpProcessing< VariableReferenceSet >
virtual VariableReferenceSet 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.
 
virtual void atTraversalEnd ()
 
- Protected Member Functions inherited from SgTreeTraversal< DummyAttribute, VariableReferenceSet >
virtual void setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer)
 
void set_useDefaultIndexBasedTraversal (bool)
 

Member Typedef Documentation

◆ VarName

A compound variable name as used by the variable renaming.


Definition at line 177 of file uniqueNameTraversal.h.

Constructor & Destructor Documentation

◆ UniqueNameTraversal()

ssa_private::UniqueNameTraversal::UniqueNameTraversal ( const std::vector< SgInitializedName * > &  allNames,
bool  treatPointersAsStructs = true,
bool  propagateNamesThroughComma = true 
)
inline
Parameters
treatPointersAsStructsIf true, expressions such as p->x will be chained together in a variable name p.x
propagateNamesThroughCommaIf true, expressions such as (a, b).x will be named as b.x.

Definition at line 182 of file uniqueNameTraversal.h.

Member Function Documentation

◆ evaluateSynthesizedAttribute()

virtual VariableReferenceSet ssa_private::UniqueNameTraversal::evaluateSynthesizedAttribute ( SgNode node,
SynthesizedAttributesList  attrs 
)
virtual

Called to evaluate the synthesized attribute on every node.

This function will handle passing all variables that are referenced by a given expression.

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

Implements AstBottomUpProcessing< VariableReferenceSet >.

Member Data Documentation

◆ varKeyTag

std::string ssa_private::UniqueNameTraversal::varKeyTag
static

Tag to use to retrieve unique naming key from node.


Definition at line 174 of file uniqueNameTraversal.h.


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