ROSE 0.11.145.192
|
Class to traverse the AST and assign unique names to every varRef.
Definition at line 154 of file uniqueNameTraversal.h.
#include <midend/programAnalysis/staticSingleAssignment/uniqueNameTraversal.h>
Public Types | |
typedef std::vector< SgInitializedName * > | VarName |
A compound variable name as used by the variable renaming. | |
Public Types inherited from AstBottomUpProcessing< VariableReferenceSet > | |
typedef SgTreeTraversal< DummyAttribute, VariableReferenceSet >::SynthesizedAttributesList | SynthesizedAttributesList |
typedef SynthesizedAttributesList | SubTreeSynthesizedAttributes |
Public Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType > | |
typedef StackFrameVector< SynthesizedAttributeType > | 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. | |
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< InheritedAttributeType, SynthesizedAttributeType > | |
SynthesizedAttributeType | traverse (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
SynthesizedAttributeType | traverseWithinFile (SgNode *basenode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
void | traverseInputFiles (SgProject *projectNode, InheritedAttributeType inheritedValue, t_traverseOrder travOrder=preandpostorder) |
SgTreeTraversal (const SgTreeTraversal &) | |
const SgTreeTraversal & | operator= (const SgTreeTraversal &) |
Static Public Attributes | |
static std::string | varKeyTag |
Tag to use to retrieve unique naming key from node. | |
Additional Inherited Members | |
Protected Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType > | |
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. | |
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< InheritedAttributeType, SynthesizedAttributeType > | |
virtual InheritedAttributeType | evaluateInheritedAttribute (SgNode *astNode, InheritedAttributeType inheritedValue)=0 |
virtual SynthesizedAttributeType | evaluateSynthesizedAttribute (SgNode *n, InheritedAttributeType in, SynthesizedAttributesList l)=0 |
virtual void | setNodeSuccessors (SgNode *node, SuccessorsContainer &succContainer) |
virtual SynthesizedAttributeType | defaultSynthesizedAttribute (InheritedAttributeType inh) |
void | set_useDefaultIndexBasedTraversal (bool) |
typedef std::vector<SgInitializedName*> ssa_private::UniqueNameTraversal::VarName |
A compound variable name as used by the variable renaming.
Definition at line 177 of file uniqueNameTraversal.h.
|
inline |
treatPointersAsStructs | If true, expressions such as p->x will be chained together in a variable name p.x |
propagateNamesThroughComma | If true, expressions such as (a, b).x will be named as b.x. |
Definition at line 182 of file uniqueNameTraversal.h.
|
virtual |
Called to evaluate the synthesized attribute on every node.
This function will handle passing all variables that are referenced by a given expression.
node | The node being evaluated. |
attrs | The attributes from the child nodes. |
Implements AstBottomUpProcessing< VariableReferenceSet >.
|
static |
Tag to use to retrieve unique naming key from node.
Definition at line 174 of file uniqueNameTraversal.h.