Skip to content

VariableRenaming::DefsAndUsesTraversal

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.

Synopsis

Declared in <src/midend/programAnalysis/variableRenaming/VariableRenaming.h>

class DefsAndUsesTraversal
    : public AstBottomUpProcessing<ChildUses>

Base Classes

Name Description
AstBottomUpProcessing<ChildUses> Attribute evaluator for synthesized attributes.

Member Functions

Name Description
DefsAndUsesTraversal
DefsAndUsesTraversal(VariableRenaming* ssa); [constructor]
Construct from VariableRenaming
evaluateSynthesizedAttribute
virtual ChildUses evaluateSynthesizedAttribute( SgNode* node, SynthesizedAttributesList attrs) override; [virtual]
Called to evaluate the synthesized attribute on every node.
setNodeSuccessors
virtual void setNodeSuccessors( SgNode* node, SuccessorsContainer& succContainer) override; [virtual]

Private Type Aliases

Name
SuccessorsContainer

Private Member Functions

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

Private Data Members

Name
ssa

Created with MrDocs