ROSE
0.11.96.11
rexompiler
src
frontend
SageIII
virtualCFG
customFilteredCFG.h
1
/*
2
* File: CustomFilteredCFG.h
3
* Author: rahman2
4
*
5
* Created on July 20, 2011, 3:41 PM
6
*/
7
8
#ifndef CUSTOMFILTEREDCFG_H
9
#define CUSTOMFILTEREDCFG_H
10
11
#include "staticCFG.h"
12
13
namespace
StaticCFG
14
{
16
template
<
typename
_Filter>
17
class
ROSE_DLL_API
CustomFilteredCFG
:
public
CFG
{
18
19
public
:
20
CustomFilteredCFG
(
SgNode
*node) :
CFG
(node,
true
) {
21
}
22
~
CustomFilteredCFG
() {
23
}
24
virtual
void
buildFilteredCFG();
25
26
27
protected
:
29
virtual
void
printEdge
(std::ostream & o,
SgDirectedGraphEdge
* edge,
bool
isInEdge) {
30
31
AstAttribute
* attr = edge->
getAttribute
(
"info"
);
32
33
if
(
CFGEdgeAttribute
<
VirtualCFG::FilteredCFGEdge<_Filter>
>* edge_attr =
dynamic_cast<
CFGEdgeAttribute<VirtualCFG::FilteredCFGEdge<_Filter>
>
*>(attr)) {
34
VirtualCFG::FilteredCFGEdge<_Filter>
e = edge_attr->getEdge();
35
o << e.source().id() <<
" -> "
<< e.target().id() <<
" [label=\""
<< escapeString(e.toString()) <<
36
"\", style=\""
<< (isInEdge ?
"dotted"
:
"solid"
) <<
"\"];\n"
;
37
}
38
else
39
ROSE_ABORT();
40
41
}
42
private
:
43
template
<
class
NodeT,
class
EdgeT>
44
void
buildTemplatedCFG(NodeT n, std::map<NodeT, SgGraphNode*>& all_nodes, std::set<NodeT>& explored);
45
46
};
47
48
}
49
#endif
/* CUSTOMFILTEREDCFG_H */
50
StaticCFG::CustomFilteredCFG
A CFG implementation with Custom filters.
Definition:
customFilteredCFG.h:17
AstAttribute
Base class for all IR node attribute values.
Definition:
AstAttributeMechanism.h:35
StaticCFG::CustomFilteredCFG::printEdge
virtual void printEdge(std::ostream &o, SgDirectedGraphEdge *edge, bool isInEdge)
Virtual function Overloaded to print the Custom Filtered CFG Edges.
Definition:
customFilteredCFG.h:29
SgGraphEdge::getAttribute
virtual AstAttribute * getAttribute(std::string s) const override
Returns attribute of name 's'.
SgDirectedGraphEdge
Definition:
Cxx_Grammar.h:37497
VirtualCFG::FilteredCFGEdge
Definition:
filteredCFG.h:13
SgNode
This class represents the base class for all IR nodes within Sage III.
Definition:
Cxx_Grammar.h:6739
StaticCFG::CFG
Definition:
staticCFG.h:24
StaticCFG::CFGEdgeAttribute
Definition:
staticCFG.h:161
Generated on Mon Dec 19 2022 23:39:37 for ROSE by
1.8.17