ROSE 0.11.145.147
Public Member Functions | Static Public Member Functions | List of all members
FunctionEvaluationOrderTraversal Class Reference

Description

Traverses a given AST and finds all function calls in the order in which they're evaluated Also, for each function we find where to put declarations of temporary variables so that they're accessible at the function call.

Definition at line 62 of file functionEvaluationOrderTraversal.h.

#include <midend/programTransformation/extractFunctionArgumentsNormalization/functionEvaluationOrderTraversal.h>

Inheritance diagram for FunctionEvaluationOrderTraversal:
Inheritance graph
[legend]
Collaboration diagram for FunctionEvaluationOrderTraversal:
Collaboration graph
[legend]

Public Member Functions

FunctionCallInheritedAttribute evaluateInheritedAttribute (SgNode *astNode, FunctionCallInheritedAttribute parentAttribute)
 Visits AST nodes in pre-order.
 
bool evaluateSynthesizedAttribute (SgNode *astNode, FunctionCallInheritedAttribute parentAttribute, SynthesizedAttributesList)
 Visits AST nodes in post-order.
 
virtual bool IsFunctionCallSideEffectFree (SgFunctionCallExp *functionCall)
 Returns true if the function call has no side effects.
 
- Public Member Functions inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >
bool traverse (SgNode *node, FunctionCallInheritedAttribute inheritedValue)
 evaluates attributes on the entire AST
 
bool traverseWithinFile (SgNode *node, FunctionCallInheritedAttribute inheritedValue)
 evaluates attributes only at nodes which represent the same file as where the evaluation was started
 
- 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 SgTreeTraversaloperator= (const SgTreeTraversal &)
 

Static Public Member Functions

static std::pair< std::vector< FunctionCallInfo >, std::vector< FunctionCallInfo > > GetFunctionCalls (SgNode *root)
 Traverses the subtree of the given AST node and finds all function calls in function-evaluation order.
 

Additional Inherited Members

- Public Types inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >
typedef SgTreeTraversal< FunctionCallInheritedAttribute, bool >::SynthesizedAttributesList SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Public Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
typedef StackFrameVector< SynthesizedAttributeType > SynthesizedAttributesList
 
- Protected Types inherited from SgTreeTraversal< InheritedAttributeType, SynthesizedAttributeType >
typedef AstSuccessorsSelectors::SuccessorsContainer SuccessorsContainer
 
typedef SuccessorsContainer & SuccessorsContainerRef
 
- Protected Member Functions inherited from AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >
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)
 

Member Function Documentation

◆ evaluateInheritedAttribute()

FunctionCallInheritedAttribute FunctionEvaluationOrderTraversal::evaluateInheritedAttribute ( SgNode astNode,
FunctionCallInheritedAttribute  parentAttribute 
)
virtual

◆ evaluateSynthesizedAttribute()

bool FunctionEvaluationOrderTraversal::evaluateSynthesizedAttribute ( SgNode astNode,
FunctionCallInheritedAttribute  parentAttribute,
SynthesizedAttributesList   
)
virtual

Visits AST nodes in post-order.

This is function-evaluation order.

Implements AstTopDownBottomUpProcessing< FunctionCallInheritedAttribute, bool >.


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