ROSE 0.11.145.192
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ssa_unfiltered_cfg::DefsAndUsesTraversal Class Reference

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 73 of file defsAndUsesUnfilteredCfg.h.

#include <midend/programAnalysis/ssaUnfilteredCfg/defsAndUsesUnfilteredCfg.h>

Inheritance diagram for ssa_unfiltered_cfg::DefsAndUsesTraversal:
Inheritance graph
[legend]
Collaboration diagram for ssa_unfiltered_cfg::DefsAndUsesTraversal:
Collaboration graph
[legend]

Public Types

typedef std::map< CFGNode, std::set< ssa_private::UniqueNameTraversal::VarName > > CFGNodeToVarsMap
 

Public Member Functions

virtual ChildUses evaluateSynthesizedAttribute (SgNode *node, SynthesizedAttributesList attrs)
 Called to evaluate the synthesized attribute on every node.
 

Static Public Member Functions

static void CollectDefsAndUses (SgNode *traversalRoot, CFGNodeToVarsMap &defs, std::map< SgNode *, std::set< SgVarRefExp * > > &uses)
 Call this method to collect defs and uses for a subtree.
 

Member Typedef Documentation

◆ CFGNodeToVarsMap

typedef std::map<CFGNode, std::set<ssa_private::UniqueNameTraversal::VarName> > ssa_unfiltered_cfg::DefsAndUsesTraversal::CFGNodeToVarsMap

Definition at line 77 of file defsAndUsesUnfilteredCfg.h.

Member Function Documentation

◆ CollectDefsAndUses()

static void ssa_unfiltered_cfg::DefsAndUsesTraversal::CollectDefsAndUses ( SgNode traversalRoot,
CFGNodeToVarsMap &  defs,
std::map< SgNode *, std::set< SgVarRefExp * > > &  uses 
)
static

Call this method to collect defs and uses for a subtree.

The additional defs and uses discovered in the tree will be inserted in the passed data structures.

◆ evaluateSynthesizedAttribute()

virtual ChildUses ssa_unfiltered_cfg::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 >.


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