GCC Middle and Back End API Reference
ana::trimmed_graph Class Reference

#include <trimmed-graph.h>

Inheritance diagram for ana::trimmed_graph:
Collaboration diagram for ana::trimmed_graph:

Public Types

typedef GraphTraits::node_t node_t
 
typedef GraphTraits::edge_t edge_t
 
typedef GraphTraits::dump_args_t dump_args_t
 
typedef GraphTraits::cluster_t cluster_t
 

Public Member Functions

 trimmed_graph (const exploded_graph &inner_graph, const exploded_node *inner_dst_node)
 
bool contains_p (const exploded_edge *eedge) const
 
void log_stats (logger *logger) const
 
void dump_dot_to_pp (pretty_printer *pp, cluster_t *root_cluster, const dump_args_t &args) const
 
void dump_dot_to_file (FILE *fp, cluster_t *root_cluster, const dump_args_t &args) const
 
void dump_dot (const char *path, cluster_t *root_cluster, const dump_args_t &args) const
 
void add_node (node_t *node)
 
void add_edge (edge_t *edge)
 

Data Fields

auto_delete_vec< node_tm_nodes
 
auto_delete_vec< edge_tm_edges
 

Private Types

typedef hash_map< const exploded_node *, trimmed_node * > map_t
 

Private Attributes

hash_set< const exploded_node * > m_enodes
 
hash_set< const exploded_edge * > m_eedges
 
map_t m_map_from_enode_to_tnode
 

Detailed Description

A digraph for trimming an exploded_graph to the subset of nodes and edges
from which paths reach INNER_DST_NODE (along with a precanned way to print
these in .dot form).   

Member Typedef Documentation

◆ cluster_t

typedef GraphTraits::cluster_t digraph< tg_traits >::cluster_t
inherited

◆ dump_args_t

typedef GraphTraits::dump_args_t digraph< tg_traits >::dump_args_t
inherited

◆ edge_t

typedef GraphTraits::edge_t digraph< tg_traits >::edge_t
inherited

◆ map_t

◆ node_t

typedef GraphTraits::node_t digraph< tg_traits >::node_t
inherited

Constructor & Destructor Documentation

◆ trimmed_graph()

ana::trimmed_graph::trimmed_graph ( const exploded_graph & inner_graph,
const exploded_node * inner_dst_node )

Member Function Documentation

◆ add_edge()

void digraph< tg_traits >::add_edge ( edge_t * edge)
inlineinherited
Add EDGE to this digraph, and to the preds/succs of its endpoints.
Take ownership of EDGE.   

◆ add_node()

void digraph< tg_traits >::add_node ( node_t * node)
inlineinherited
Add NODE to this DIGRAPH, taking ownership.   

◆ contains_p()

bool ana::trimmed_graph::contains_p ( const exploded_edge * eedge) const
inline

References ggc_alloc(), and m_eedges.

◆ dump_dot()

void digraph< tg_traits >::dump_dot ( const char * path,
cluster_t * root_cluster,
const dump_args_t & args ) 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.   

◆ dump_dot_to_file()

void digraph< tg_traits >::dump_dot_to_file ( FILE * fp,
cluster_t * root_cluster,
const dump_args_t & args ) 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.   

◆ dump_dot_to_pp()

void digraph< tg_traits >::dump_dot_to_pp ( pretty_printer * pp,
cluster_t * root_cluster,
const dump_args_t & args ) 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.   

◆ log_stats()

void ana::trimmed_graph::log_stats ( logger * logger) const

Field Documentation

◆ m_edges

auto_delete_vec<edge_t> digraph< tg_traits >::m_edges
inherited

◆ m_eedges

hash_set<const exploded_edge *> ana::trimmed_graph::m_eedges
private

Referenced by contains_p().

◆ m_enodes

hash_set<const exploded_node *> ana::trimmed_graph::m_enodes
private

◆ m_map_from_enode_to_tnode

map_t ana::trimmed_graph::m_map_from_enode_to_tnode
private

◆ m_nodes

auto_delete_vec<node_t> digraph< tg_traits >::m_nodes
inherited

The documentation for this class was generated from the following file: