Skip to content

VirtualCFG

Types

Name Description
CFGEdge A control flow edge connecting two CFG nodes, with an edge condition to indicate edge types
CFGNode A node in the control flow graph. Each CFG node corresponds to an AST node, but there can be several CFG nodes for a given AST node.
CFGPath
CfgToDotImpl
DataflowEdge
DataflowNode
FilteredCFGEdge
FilteredCFGNode
InterestingEdge "Interesting" node and edge filters
InterestingNode
MakeClosure
back_dataflow
back_iterator
dataflow
iterator

Enums

Name Description
EdgeConditionKind The conditions attached to edges are marked to determine which conditions trigger control to flow along that edge (as opposed to other edges out of the same source node). For conditional branches (except eckCaseLabel and eckDefault), the conditions are implicit and depend on knowledge of the particular control structure. Fortran support for this is underdeveloped; single AST nodes representing variable-length loops was not part of the original design of the CFG code.

Functions

Name Description
cfgBeginningOfConstruct
CFGNode cfgBeginningOfConstruct(SgNode* c);
The first CFG node for a construct (before the construct starts to execute)
cfgEndOfConstruct
CFGNode cfgEndOfConstruct(SgNode* c);
The last CFG node for a construct (after the entire construct has finished executing). This node may not actually be reached if, for example, a goto causes a loop to be exited in the middle
cfgIndexForEndWrapper
unsigned int cfgIndexForEndWrapper(SgNode* n);
cfgToDot
[[visibility("default")]] void cfgToDot( SgNode* start, std::string const& file_name);
Dump the filtered dot graph of a virtual control flow graph starting from SgNode (start)
cfgToDotForDebugging
[[visibility("default")]] void cfgToDotForDebugging( SgNode* start, std::string const& file_name);
Dump the full dot graph of a virtual control flow graph starting from SgNode (start)
defaultFilter
bool defaultFilter(CFGNode cfgn);
dfaToDot
template<typename FilterFunction> [[visibility("default")]] std::ostream& dfaToDot( std::ostream& o, std::string graphName, std::vector<FilteredCFGNode<FilterFunction>> start, DefUseAnalysis* dfa);
getCFGTargetOfFortranLabelRef
CFGNode getCFGTargetOfFortranLabelRef(SgLabelRefExp* lRef);
getCFGTargetOfFortranLabelSymbol
CFGNode getCFGTargetOfFortranLabelSymbol(SgLabelSymbol* sym);
interestingCfgToDot
[[visibility("default")]] void interestingCfgToDot( SgNode* start, std::string const& file_name);
Dump a CFG with only interesting nodes for a SgNode
makeCfg
CFGNode makeCfg(SgNode* start);
Returns CFG node for just before start
makeClosure
template< typename FilteredEdge, typename Filter> std::vector<FilteredEdge> makeClosure( std::vector<CFGEdge> const& orig, std::vector<CFGEdge> const(CFGNode::* closure)(), CFGNode const(CFGPath::* otherSide)(), CFGPath(* merge)(CFGPath const&, CFGPath const&), Filter const& filter);
makeEdge
template< class Node1T, class Node2T, class EdgeT> void makeEdge( Node1T from, Node2T to, std::vector<EdgeT>& result);
Utility function to make CFG Edges
makeInterestingCfg
InterestingNode makeInterestingCfg(SgNode* start);
mergePaths
CFGPath mergePaths( CFGPath const& hd, CFGPath const& tl);
mergePathsReversed
CFGPath mergePathsReversed( CFGPath const& tl, CFGPath const& hd);
printEdge
template< typename EdgeT, bool Debug> void printEdge( std::ostream& o, EdgeT const& e, bool isInEdge);
Edge printer
printNode
template< typename NodeT, bool Debug> void printNode( std::ostream& o, NodeT const& n);
Helper function to print Node information
printNodePlusEdges
template< typename NodeT, typename EdgeT, bool Debug> void printNodePlusEdges( std::ostream& o, NodeT n);
Print out a node plus all its outgoing edges

Created with MrDocs