|
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 hash_map< const function *, unsigned > | function_to_num_snodes_t |
Private Member Functions | |
| gimple * | populate_for_basic_block (basic_block bb, function *fun, logger *logger) |
| void | add_sedges_for_cfg_edge (supernode *src, supernode *dest, ::edge e, gimple *control_stmt, region_model_manager &mgr, logger *logger) |
| void | dump_dot_to_gv_for_loop (graphviz_out &gv, const dump_args_t &, class loop *, function *) const |
| void | dump_dot_to_gv_for_bb (graphviz_out &gv, const dump_args_t &, basic_block, function *) const |
| void | reorder_nodes_and_ids (const std::vector< supernode * > &ordering, logger *logger) |
Private Attributes | |
| bb_to_node_t | m_bb_to_initial_node |
| bb_to_node_t | m_bb_to_final_node |
| std::map< const gimple *, supernode * > | m_node_for_stmt |
| std::map<::edge, superedge * > | m_edges_for_phis |
| function_to_num_snodes_t | m_function_to_num_snodes |
| saved_uids | m_stmt_uids |
| int | m_next_snode_id |
| std::vector< supernode * > | m_snode_by_id |
A directed graph class representing the users's code, with nodes representing locations within functions, and edges representing transitions between them. For historical reasons we call this the "supergraph", although this is now a misnomer as we no longer add callgraph edges to this graph: the edges within the supergraph are purely intraprocedural: either linking consecutive stmts in a basic block, or linking basic blocks (corresponding to CFG edges). However, all functions are within the same graph.
|
private |
|
inherited |
|
inherited |
|
inherited |
|
private |
|
inherited |
| ana::supergraph::supergraph | ( | region_model_manager & | mgr, |
| logger * | logger ) |
| ana::supergraph::~supergraph | ( | ) |
|
inlinevirtualinherited |
|
inlineinherited |
Add EDGE to this digraph, and to the preds/succs of its endpoints. Take ownership of EDGE.
| supernode * ana::supergraph::add_node | ( | function * | fun, |
| basic_block | bb, | ||
| logger * | logger ) |
|
inlineinherited |
Add NODE to this DIGRAPH, taking ownership.
|
private |
| void ana::supergraph::delete_nodes | ( | const std::set< supernode * > & | snodes | ) |
| void ana::supergraph::dump_dot | ( | const char * | path, |
| const dump_args_t & | ) const |
References path.
|
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.
|
private |
|
private |
| 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.
| void ana::supergraph::fixup_locations | ( | logger * | ) |
|
inline |
References m_bb_to_final_node.
Referenced by get_node_for_function_exit().
|
inline |
References m_bb_to_initial_node.
Referenced by get_node_for_function_entry().
References ENTRY_BLOCK_PTR_FOR_FN, and get_initial_node_for_block().
References EXIT_BLOCK_PTR_FOR_FN, and get_final_node_for_block().
|
inline |
References m_function_to_num_snodes, and map.
References m_edges_for_phis.
References gcc_assert, m_node_for_stmt, and ana::stmt.
| void ana::supergraph::log_stats | ( | logger * | logger | ) | const |
|
inline |
References digraph< supergraph_traits >::m_edges.
|
inline |
References digraph< supergraph_traits >::m_nodes.
|
private |
|
private |
| void ana::supergraph::simplify | ( | logger * | ) |
| void ana::supergraph::sort_nodes | ( | logger * | logger | ) |
| std::unique_ptr< json::object > ana::supergraph::to_json | ( | ) | const |
|
private |
Referenced by get_final_node_for_block().
|
private |
Referenced by get_initial_node_for_block().
|
inherited |
Referenced by ana::supergraph::num_edges().
Referenced by get_superedge_for_phis().
|
private |
Referenced by get_num_snodes().
|
private |
Referenced by get_supernode_for_stmt().
|
inherited |
Referenced by ana::supergraph::num_nodes().
|
private |
|
private |