GCC Middle and Back End API Reference
|
#include <supergraph.h>
Public Types | |
typedef supergraph_traits::node_t | node_t |
typedef supergraph_traits::edge_t | edge_t |
typedef supergraph_traits::dump_args_t | dump_args_t |
typedef supergraph_traits::cluster_t | cluster_t |
Data Fields | |
auto_delete_vec< node_t > | m_nodes |
auto_delete_vec< edge_t > | m_edges |
Private Types | |
typedef ordered_hash_map< basic_block, supernode * > | bb_to_node_t |
typedef ordered_hash_map< cgraph_edge *, supernode * > | cgraph_edge_to_node_t |
typedef ordered_hash_map< ::edge, cfg_superedge * > | cfg_edge_to_cfg_superedge_t |
typedef ordered_hash_map< cgraph_edge *, call_superedge * > | cgraph_edge_to_call_superedge_t |
typedef ordered_hash_map< cgraph_edge *, return_superedge * > | cgraph_edge_to_return_superedge_t |
typedef ordered_hash_map< cgraph_edge *, superedge * > | cgraph_edge_to_intraproc_superedge_t |
typedef ordered_hash_map< gimple *, supernode * > | stmt_to_node_t |
typedef hash_map< const function *, unsigned > | function_to_num_snodes_t |
Private Member Functions | |
supernode * | add_node (function *fun, basic_block bb, gcall *returning_call, gimple_seq phi_nodes) |
cfg_superedge * | add_cfg_edge (supernode *src, supernode *dest, ::edge e) |
call_superedge * | add_call_superedge (supernode *src, supernode *dest, cgraph_edge *cedge) |
return_superedge * | add_return_superedge (supernode *src, supernode *dest, cgraph_edge *cedge) |
A "supergraph" is a directed graph formed by joining together all CFGs, linking them via interprocedural call and return edges. Basic blocks are split at callsites, so that a call statement occurs twice: once at the end of a supernode, and a second instance at the start of the next supernode (to handle the return).
|
private |
|
private |
|
private |
|
inherited |
|
inherited |
|
inherited |
|
private |
|
inherited |
|
private |
ana::supergraph::supergraph | ( | logger * | logger | ) |
ana::supergraph::~supergraph | ( | ) |
|
private |
|
private |
|
inlineinherited |
Add EDGE to this digraph, and to the preds/succs of its endpoints. Take ownership of EDGE.
|
private |
|
inlineinherited |
Add NODE to this DIGRAPH, taking ownership.
|
private |
void ana::supergraph::dump_dot | ( | const char * | path, |
const dump_args_t & | ) const |
|
inlineinherited |
Write .dot information for this graph to a file at PATH, passing ARGS to the nodes and edges. If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.
void ana::supergraph::dump_dot_to_file | ( | FILE * | fp, |
const dump_args_t & | ) const |
|
inlineinherited |
Write .dot information for this graph to FP, passing ARGS to the nodes and edges. If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.
void ana::supergraph::dump_dot_to_pp | ( | pretty_printer * | pp, |
const dump_args_t & | ) const |
|
inlineinherited |
Write .dot information for this graph to PP, passing ARGS to the nodes and edges. If ROOT_CLUSTER is non-NULL, use it to organize the nodes into clusters.
|
inline |
References m_cgraph_edge_to_caller_next_node.
|
inline |
References m_cgraph_edge_to_call_superedge.
Referenced by ana::return_superedge::get_edge_for_call().
|
inline |
References m_cfg_edge_to_cfg_superedge.
|
inline |
References m_cgraph_edge_to_return_superedge.
Referenced by ana::call_superedge::get_edge_for_return().
|
inline |
References m_cgraph_edge_to_intraproc_superedge.
|
inline |
References digraph< supergraph_traits >::m_nodes.
|
inline |
References m_bb_to_initial_node.
Referenced by get_node_for_function_entry(), and get_node_for_function_exit().
References ENTRY_BLOCK_PTR_FOR_FN, and get_node_for_block().
References EXIT_BLOCK_PTR_FOR_FN, and get_node_for_block().
|
inline |
References m_function_to_num_snodes, and map.
References m_stmt_to_node_t.
|
inline |
References digraph< supergraph_traits >::m_edges.
|
inline |
References digraph< supergraph_traits >::m_nodes.
json::object * ana::supergraph::to_json | ( | ) | const |
|
private |
|
private |
Referenced by get_node_for_block().
|
private |
Referenced by get_edge_for_cfg_edge().
|
private |
Referenced by get_edge_for_call().
|
private |
Referenced by get_caller_next_node().
|
private |
|
private |
Referenced by get_intraprocedural_edge_for_call().
|
private |
Referenced by get_edge_for_return().
|
inherited |
Referenced by num_edges().
|
private |
Referenced by get_num_snodes().
|
inherited |
Referenced by get_node_by_index(), and num_nodes().
|
private |
Referenced by get_supernode_for_stmt().
|
private |