GCC Middle and Back End API Reference
ana::exploded_node Class Referenceabstract

#include <exploded-graph.h>

Inheritance diagram for ana::exploded_node:
Collaboration diagram for ana::exploded_node:

Data Structures

struct  on_stmt_flags
 

Public Types

enum  status { STATUS_WORKLIST , STATUS_PROCESSED , STATUS_MERGER , STATUS_BULK_MERGED }
 
typedef eg_traits::edge_t edge_t
 
typedef eg_traits::dump_args_t dump_args_t
 

Public Member Functions

 exploded_node (const point_and_state &ps, int index)
 
hashval_t hash () const
 
const char * get_dot_fillcolor () const
 
void dump_dot (graphviz_out *gv, const dump_args_t &args) const final override
 
void dump_dot_id (pretty_printer *pp) const
 
void dump_to_pp (pretty_printer *pp, const extrinsic_state &ext_state) const
 
void dump (FILE *fp, const extrinsic_state &ext_state) const
 
void dump (const extrinsic_state &ext_state) const
 
void dump_processed_stmts (pretty_printer *pp) const
 
void dump_saved_diagnostics (pretty_printer *pp) const
 
std::unique_ptr< json::objectto_json (const extrinsic_state &ext_state) const
 
on_stmt_flags on_stmt (exploded_graph &eg, const supernode *snode, const gimple *stmt, program_state *state, uncertainty_t *uncertainty, bool *out_could_have_done_work, path_context *path_ctxt)
 
void on_stmt_pre (exploded_graph &eg, const gimple *stmt, program_state *state, bool *out_terminate_path, bool *out_unknown_side_effects, region_model_context *ctxt)
 
void on_stmt_post (const gimple *stmt, program_state *state, bool unknown_side_effects, region_model_context *ctxt)
 
on_stmt_flags replay_call_summaries (exploded_graph &eg, const supernode *snode, const gcall *call_stmt, program_state *state, path_context *path_ctxt, const function &called_fn, per_function_data &called_fn_data, region_model_context *ctxt)
 
void replay_call_summary (exploded_graph &eg, const supernode *snode, const gcall *call_stmt, program_state *state, path_context *path_ctxt, const function &called_fn, call_summary *summary, region_model_context *ctxt)
 
bool on_edge (exploded_graph &eg, const superedge *succ, program_point *next_point, program_state *next_state, uncertainty_t *uncertainty)
 
void on_longjmp (exploded_graph &eg, const gcall *call, program_state *new_state, region_model_context *ctxt)
 
void detect_leaks (exploded_graph &eg)
 
const program_pointget_point () const
 
const supernodeget_supernode () const
 
functionget_function () const
 
int get_stack_depth () const
 
const gimpleget_stmt () const
 
const gimpleget_processed_stmt (unsigned idx) const
 
const program_stateget_state () const
 
const point_and_stateget_ps_key () const
 
const program_pointget_point_key () const
 
void dump_succs_and_preds (FILE *outf) const
 
enum status get_status () const
 
void set_status (enum status status)
 
void add_diagnostic (const saved_diagnostic *sd)
 
unsigned get_num_diagnostics () const
 
const saved_diagnosticget_saved_diagnostic (unsigned idx) const
 
virtual void dump_dot (graphviz_out *gv, const dump_args_t &args) const=0
 

Static Public Member Functions

static const char * status_to_str (enum status s)
 

Data Fields

const int m_index
 
unsigned m_num_processed_stmts
 
auto_vec< edge_t * > m_preds
 
auto_vec< edge_t * > m_succs
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (exploded_node)
 

Private Attributes

const point_and_state m_ps
 
enum status m_status
 
auto_vec< const saved_diagnostic * > m_saved_diagnostics
 

Detailed Description

An exploded_node is a unique, immutable <point, state> pair within the
exploded_graph.
Each exploded_node has a unique index within the graph
(for ease of debugging).   

Member Typedef Documentation

◆ dump_args_t

eg_traits::dump_args_t dnode< eg_traits >::dump_args_t
inherited

◆ edge_t

eg_traits::edge_t dnode< eg_traits >::edge_t
inherited

Member Enumeration Documentation

◆ status

Enumerator
STATUS_WORKLIST 
STATUS_PROCESSED 
STATUS_MERGER 
STATUS_BULK_MERGED 

Constructor & Destructor Documentation

◆ exploded_node()

ana::exploded_node::exploded_node ( const point_and_state & ps,
int index )

Member Function Documentation

◆ add_diagnostic()

void ana::exploded_node::add_diagnostic ( const saved_diagnostic * sd)
inline

References m_saved_diagnostics.

◆ detect_leaks()

void ana::exploded_node::detect_leaks ( exploded_graph & eg)

◆ DISABLE_COPY_AND_ASSIGN()

ana::exploded_node::DISABLE_COPY_AND_ASSIGN ( exploded_node )
private

◆ dump() [1/2]

void ana::exploded_node::dump ( const extrinsic_state & ext_state) const

◆ dump() [2/2]

void ana::exploded_node::dump ( FILE * fp,
const extrinsic_state & ext_state ) const

◆ dump_dot() [1/2]

void ana::exploded_node::dump_dot ( graphviz_out * gv,
const dump_args_t & args ) const
finaloverride

◆ dump_dot() [2/2]

virtual void dnode< eg_traits >::dump_dot ( graphviz_out * gv,
const dump_args_t & args ) const
pure virtualinherited

◆ dump_dot_id()

void ana::exploded_node::dump_dot_id ( pretty_printer * pp) const

◆ dump_processed_stmts()

void ana::exploded_node::dump_processed_stmts ( pretty_printer * pp) const

◆ dump_saved_diagnostics()

void ana::exploded_node::dump_saved_diagnostics ( pretty_printer * pp) const

◆ dump_succs_and_preds()

void ana::exploded_node::dump_succs_and_preds ( FILE * outf) const

◆ dump_to_pp()

void ana::exploded_node::dump_to_pp ( pretty_printer * pp,
const extrinsic_state & ext_state ) const

◆ get_dot_fillcolor()

const char * ana::exploded_node::get_dot_fillcolor ( ) const

◆ get_function()

◆ get_num_diagnostics()

unsigned ana::exploded_node::get_num_diagnostics ( ) const
inline

References m_saved_diagnostics.

◆ get_point()

◆ get_point_key()

const program_point * ana::exploded_node::get_point_key ( ) const
inline

◆ get_processed_stmt()

const gimple * ana::exploded_node::get_processed_stmt ( unsigned idx) const

◆ get_ps_key()

const point_and_state * ana::exploded_node::get_ps_key ( ) const
inline

References m_ps.

◆ get_saved_diagnostic()

const saved_diagnostic * ana::exploded_node::get_saved_diagnostic ( unsigned idx) const
inline

References m_saved_diagnostics.

◆ get_stack_depth()

◆ get_state()

const program_state & ana::exploded_node::get_state ( ) const
inline

◆ get_status()

enum status ana::exploded_node::get_status ( ) const
inline

References m_status.

Referenced by starts_infinite_loop_p().

◆ get_stmt()

const gimple * ana::exploded_node::get_stmt ( ) const
inline

◆ get_supernode()

◆ hash()

hashval_t ana::exploded_node::hash ( ) const
inline

◆ on_edge()

bool ana::exploded_node::on_edge ( exploded_graph & eg,
const superedge * succ,
program_point * next_point,
program_state * next_state,
uncertainty_t * uncertainty )

◆ on_longjmp()

void ana::exploded_node::on_longjmp ( exploded_graph & eg,
const gcall * call,
program_state * new_state,
region_model_context * ctxt )

◆ on_stmt()

on_stmt_flags ana::exploded_node::on_stmt ( exploded_graph & eg,
const supernode * snode,
const gimple * stmt,
program_state * state,
uncertainty_t * uncertainty,
bool * out_could_have_done_work,
path_context * path_ctxt )

◆ on_stmt_post()

void ana::exploded_node::on_stmt_post ( const gimple * stmt,
program_state * state,
bool unknown_side_effects,
region_model_context * ctxt )

◆ on_stmt_pre()

void ana::exploded_node::on_stmt_pre ( exploded_graph & eg,
const gimple * stmt,
program_state * state,
bool * out_terminate_path,
bool * out_unknown_side_effects,
region_model_context * ctxt )

◆ replay_call_summaries()

on_stmt_flags ana::exploded_node::replay_call_summaries ( exploded_graph & eg,
const supernode * snode,
const gcall * call_stmt,
program_state * state,
path_context * path_ctxt,
const function & called_fn,
per_function_data & called_fn_data,
region_model_context * ctxt )

◆ replay_call_summary()

void ana::exploded_node::replay_call_summary ( exploded_graph & eg,
const supernode * snode,
const gcall * call_stmt,
program_state * state,
path_context * path_ctxt,
const function & called_fn,
call_summary * summary,
region_model_context * ctxt )

◆ set_status()

void ana::exploded_node::set_status ( enum status status)
inline

References gcc_assert, m_status, and STATUS_WORKLIST.

◆ status_to_str()

static const char * ana::exploded_node::status_to_str ( enum status s)
static

◆ to_json()

std::unique_ptr< json::object > ana::exploded_node::to_json ( const extrinsic_state & ext_state) const

Field Documentation

◆ m_index

◆ m_num_processed_stmts

unsigned ana::exploded_node::m_num_processed_stmts

◆ m_preds

auto_vec<edge_t *> dnode< eg_traits >::m_preds
inherited

◆ m_ps

const point_and_state ana::exploded_node::m_ps
private

◆ m_saved_diagnostics

auto_vec<const saved_diagnostic *> ana::exploded_node::m_saved_diagnostics
private

◆ m_status

enum status ana::exploded_node::m_status
private

Referenced by get_status(), and set_status().

◆ m_succs

auto_vec<edge_t *> dnode< eg_traits >::m_succs
inherited

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