ROSE 0.11.145.147
interproceduralCFG.h
1#ifndef INTERPROCEDURAL_CFG_H
2#define INTERPROCEDURAL_CFG_H
3
4#include "staticCFG.h"
5#include "CallGraph.h"
6#include <map>
7#include <set>
8#include <string>
9
10
12class SgGraphNode;
14
15
16namespace StaticCFG
17{
18
21
22
23class ROSE_DLL_API InterproceduralCFG : public CFG
24{
25protected:
26 virtual void buildCFG(CFGNode n,
27 std::map<CFGNode, SgGraphNode*>& all_nodes,
28 std::set<CFGNode>& explored,
29 ClassHierarchyWrapper* classHierarchy);
30public:
31 InterproceduralCFG() : CFG() {}
32
33 // The valid nodes are SgProject, SgStatement, SgExpression and SgInitializedName
34 InterproceduralCFG(SgNode* node, bool is_filtered = false)
35 : CFG() {
36 graph_ = NULL;
37 is_filtered_ = is_filtered;
38 start_ = node;
39 buildCFG();
40 }
41 SgNode* getEntry()
42 {
43 return start_;
44 }
45 SgIncidenceDirectedGraph* getGraph()
46 {
47 return graph_;
48 }
49 SgGraphNode* getGraphNode(CFGNode n) {
50 return alNodes[n];
51 }
52 // Build CFG according to the 'is_filtered_' flag.
53 virtual void buildCFG()
54 {
55 buildFullCFG();
56 }
57 std::map<CFGNode, SgGraphNode*> alNodes;
58 CFGNode neededStart;
59 // Build CFG for debugging.
60 virtual void buildFullCFG();
61 // Build filtered CFG which only contains interesting nodes.
62 virtual void buildFilteredCFG();
63};
64
65} // end of namespace StaticCFG
66
67#endif
This class represents the base class for all IR nodes within Sage III.
virtual void buildFilteredCFG()
Build filtered CFG which only contains interesting nodes.
virtual void buildFullCFG()
Build CFG for debugging.
virtual void buildCFG()
Build CFG according to the 'is_filtered_' flag.
A control flow edge connecting two CFG nodes, with an edge condition to indicate edge types.
Definition virtualCFG.h:111
A node in the control flow graph.
Definition virtualCFG.h:70