|
LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
#include <fundec-graph.hh>


Public Types | |
| typedef directed_graph < ast::FunctionDec *, empty > | self_type |
| typedef graph < boost::bidirectionalS, ast::FunctionDec *, empty > | super_type |
| typedef super_type::vertex_descriptor | vertex_descriptor |
| typedef boost::graph_traits < self_type >::vertex_iterator | vertex_iter_type |
| Iterator on the vertices of a directed_graph. | |
| typedef boost::graph_traits < self_type > ::adjacency_iterator | neighb_iter_type |
| Iterator on the neighbors of the vertex of a directed_graph. | |
| typedef boost::graph_traits < self_type >::edge_iterator | edge_iter_type |
| Iterator on the edges of a graph. | |
Public Member Functions | |
| FundecGraph () | |
| virtual | ~FundecGraph () |
| void | fundec_add (ast::FunctionDec *f) |
| Add a vertex to the graph, and attach a function definition to it. | |
| void | fundec_link (ast::FunctionDec *fu, ast::FunctionDec *fv) |
| vertex_descriptor | hfundec_get (ast::FunctionDec *f) const |
| Retrieve the vertex handle corresponding to a FunctionDec. | |
| virtual void | edge_add (const vertex_descriptor &v1, const vertex_descriptor &v2) override |
| Add an edge between two vertices. | |
| std::list< vertex_descriptor > | topological_sort () const |
| Topological sort. | |
| vertex_descriptor | vertex_add (const ast::FunctionDec *&l) |
| Add a vertex to the graph. | |
| virtual std::ostream & | print (std::ostream &ostr) const |
| virtual void | print (std::string file) const |
| virtual std::ostream & | epilogue_print (std::ostream &ostr) const |
| const std::string & | name_get () const |
| void | name_set (const std::string &name) |
Protected Types | |
| typedef std::map < ast::FunctionDec *, vertex_descriptor > | hfundecs_type |
Protected Member Functions | |
| virtual std::ostream & | vertex_print (vertex_descriptor v, std::ostream &ostr) const override |
| Print the label of vertex of a graph. | |
Protected Attributes | |
| hfundecs_type | hfundecs |
|
inherited |
Iterator on the edges of a graph.
|
protected |
|
inherited |
Iterator on the neighbors of the vertex of a directed_graph.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Iterator on the vertices of a directed_graph.
|
inline |
|
inlinevirtual |
|
overridevirtualinherited |
Add an edge between two vertices.
Iterators.This is just a wrapper around boost::add_edge.
Implements misc::graph< boost::bidirectionalS, ast::FunctionDec *, empty >.
|
virtualinherited |
|
inline |
Add a vertex to the graph, and attach a function definition to it.
References hfundecs, and misc::graph< boost::bidirectionalS, ast::FunctionDec *, empty >::vertex_add().
Referenced by callgraph::CallGraphVisitor::operator()().
|
inline |
Create an edge between to vertices, identified by the FunctionDec attached to each of them.
References hfundecs.
Referenced by callgraph::CallGraphVisitor::operator()().
|
inline |
|
inherited |
Graph name.
|
inherited |
|
virtualinherited |
Graph pretty printing.
|
virtualinherited |
|
inherited |
Topological sort.
This version (algorithm 17.5 in Modern Compiler Implementation in ML, p. 390) is not the same as boost::topological_sort since the former works on directed acyclic graphs (DAGs) and the latter doesn't.
|
inherited |
Add a vertex to the graph.
Graph manipulation.Just a wrapper around boost::add_vertex.
Referenced by fundec_add().
|
inlineoverrideprotectedvirtual |
Print the label of vertex of a graph.
Implements misc::graph< boost::bidirectionalS, ast::FunctionDec *, empty >.
|
protected |
Referenced by fundec_add(), fundec_link(), and hfundec_get().