21#ifndef GCC_ANALYZER_SUPERGRAPH_H
22#define GCC_ANALYZER_SUPERGRAPH_H
164 (
const_cast <gimple *
> (stmt)));
171 std::unique_ptr<json::object>
to_json ()
const;
185 return *
map.get (fun);
258 std::unique_ptr<json::object>
to_json ()
const;
321 const final override;
324 bool user_facing)
const = 0;
326 std::unique_ptr<json::object>
to_json ()
const;
590 return sedge->dyn_cast_switch_cfg_superedge () !=
NULL;
604 bool within_table ATTRIBUTE_UNUSED)
610 const gimple *stmt ATTRIBUTE_UNUSED,
611 bool within_row ATTRIBUTE_UNUSED)
#define ENTRY_BLOCK_PTR_FOR_FN(FN)
Definition basic-block.h:194
#define EXIT_BLOCK_PTR_FOR_FN(FN)
Definition basic-block.h:195
Definition supergraph.h:446
call_superedge * dyn_cast_call_superedge() final override
Definition supergraph.h:452
call_superedge(supernode *src, supernode *dst, cgraph_edge *cedge)
Definition supergraph.h:448
const call_superedge * dyn_cast_call_superedge() const final override
Definition supergraph.h:456
return_superedge * get_edge_for_return(const supergraph &sg) const
Definition supergraph.h:461
Definition supergraph.h:393
tree map_expr_from_callee_to_caller(tree callee_expr, callsite_expr *out) const
tree get_arg_for_parm(tree parm, callsite_expr *out) const
function * get_caller_function() const
tree get_callee_decl() const
callgraph_superedge(supernode *src, supernode *dst, enum edge_kind kind, cgraph_edge *cedge)
Definition supergraph.h:395
gcall * get_call_stmt() const
cgraph_edge *const m_cedge
Definition supergraph.h:426
callgraph_superedge * dyn_cast_callgraph_superedge() final override
Definition supergraph.h:404
tree map_expr_from_caller_to_callee(tree caller_expr, callsite_expr *out) const
tree get_parm_for_arg(tree arg, callsite_expr *out) const
function * get_callee_function() const
tree get_caller_decl() const
void dump_label_to_pp(pretty_printer *pp, bool user_facing) const final override
const callgraph_superedge * dyn_cast_callgraph_superedge() const final override
Definition supergraph.h:408
Definition supergraph.h:359
static callsite_expr from_zero_based_param(int idx)
Definition supergraph.h:363
callsite_expr()
Definition supergraph.h:361
int m_val
Definition supergraph.h:386
static callsite_expr from_return_value()
Definition supergraph.h:368
bool return_value_p() const
Definition supergraph.h:378
callsite_expr(int val)
Definition supergraph.h:384
bool param_p() const
Definition supergraph.h:373
Definition supergraph.h:515
const ::edge m_cfg_edge
Definition supergraph.h:538
int true_value_p() const
Definition supergraph.h:528
location_t get_goto_locus() const
Definition supergraph.h:535
void dump_label_to_pp(pretty_printer *pp, bool user_facing) const override
size_t get_phi_arg_idx() const
cfg_superedge * dyn_cast_cfg_superedge() final override
Definition supergraph.h:523
int get_flags() const
Definition supergraph.h:527
int back_edge_p() const
Definition supergraph.h:530
cfg_superedge(supernode *src, supernode *dst, ::edge e)
Definition supergraph.h:517
const cfg_superedge * dyn_cast_cfg_superedge() const final override
Definition supergraph.h:524
tree get_phi_arg(const gphi *phi) const
::edge get_cfg_edge() const
Definition supergraph.h:526
int false_value_p() const
Definition supergraph.h:529
Definition supergraph.h:599
virtual bool add_node_annotations(graphviz_out *gv, const supernode &n, bool within_table) const
Definition supergraph.h:602
virtual void add_stmt_annotations(graphviz_out *gv, const gimple *stmt, bool within_row) const
Definition supergraph.h:609
virtual bool add_after_node_annotations(graphviz_out *gv, const supernode &n) const
Definition supergraph.h:613
virtual ~dot_annotator()
Definition supergraph.h:601
Definition analyzer-logging.h:34
Definition supergraph.h:482
call_superedge * get_edge_for_call(const supergraph &sg) const
Definition supergraph.h:494
return_superedge * dyn_cast_return_superedge() final override
Definition supergraph.h:488
return_superedge(supernode *src, supernode *dst, cgraph_edge *cedge)
Definition supergraph.h:484
const return_superedge * dyn_cast_return_superedge() const final override
Definition supergraph.h:489
Definition supergraph.h:92
void restore_uids() const
void make_uid_unique(gimple *stmt)
auto_vec< std::pair< gimple *, unsigned > > m_old_stmt_uids
Definition supergraph.h:98
Definition supergraph.h:314
void dump_dot(graphviz_out *gv, const dump_args_t &args) const final override
cgraph_edge * get_any_callgraph_edge() const
enum edge_kind get_kind() const
Definition supergraph.h:328
void dump(pretty_printer *pp) const
::edge get_any_cfg_edge() const
virtual return_superedge * dyn_cast_return_superedge()
Definition supergraph.h:337
virtual const callgraph_superedge * dyn_cast_callgraph_superedge() const
Definition supergraph.h:334
superedge(supernode *src, supernode *dest, enum edge_kind kind)
Definition supergraph.h:346
virtual const switch_cfg_superedge * dyn_cast_switch_cfg_superedge() const
Definition supergraph.h:332
virtual callgraph_superedge * dyn_cast_callgraph_superedge()
Definition supergraph.h:333
virtual cfg_superedge * dyn_cast_cfg_superedge()
Definition supergraph.h:330
virtual const cfg_superedge * dyn_cast_cfg_superedge() const
Definition supergraph.h:331
label_text get_description(bool user_facing) const
std::unique_ptr< json::object > to_json() const
enum edge_kind m_kind
Definition supergraph.h:352
virtual ~superedge()
Definition supergraph.h:316
virtual const call_superedge * dyn_cast_call_superedge() const
Definition supergraph.h:336
virtual void dump_label_to_pp(pretty_printer *pp, bool user_facing) const =0
virtual call_superedge * dyn_cast_call_superedge()
Definition supergraph.h:335
virtual const return_superedge * dyn_cast_return_superedge() const
Definition supergraph.h:338
Definition supergraph.h:109
ordered_hash_map< cgraph_edge *, supernode * > cgraph_edge_to_node_t
Definition supergraph.h:203
std::unique_ptr< json::object > to_json() const
cgraph_edge_to_call_superedge_t m_cgraph_edge_to_call_superedge
Definition supergraph.h:213
supernode * get_caller_next_node(cgraph_edge *edge) const
Definition supergraph.h:131
int num_edges() const
Definition supergraph.h:174
stmt_to_node_t m_stmt_to_node_t
Definition supergraph.h:224
supergraph(logger *logger)
ordered_hash_map< cgraph_edge *, call_superedge * > cgraph_edge_to_call_superedge_t
Definition supergraph.h:212
unsigned get_num_snodes(const function *fun) const
Definition supergraph.h:181
ordered_hash_map< cgraph_edge *, return_superedge * > cgraph_edge_to_return_superedge_t
Definition supergraph.h:216
cgraph_edge_to_intraproc_superedge_t m_cgraph_edge_to_intraproc_superedge
Definition supergraph.h:221
ordered_hash_map< basic_block, supernode * > bb_to_node_t
Definition supergraph.h:199
cgraph_edge_to_node_t m_cgraph_edge_to_caller_next_node
Definition supergraph.h:205
int num_nodes() const
Definition supergraph.h:173
supernode * get_node_for_function_exit(const function &fun) const
Definition supergraph.h:119
superedge * get_intraprocedural_edge_for_call(cgraph_edge *edge) const
Definition supergraph.h:149
bb_to_node_t m_bb_to_final_node
Definition supergraph.h:201
ordered_hash_map< gimple *, supernode * > stmt_to_node_t
Definition supergraph.h:223
supernode * get_node_for_block(basic_block bb) const
Definition supergraph.h:124
cfg_superedge * add_cfg_edge(supernode *src, supernode *dest, ::edge e)
cfg_edge_to_cfg_superedge_t m_cfg_edge_to_cfg_superedge
Definition supergraph.h:209
supernode * get_node_by_index(int idx) const
Definition supergraph.h:176
return_superedge * add_return_superedge(supernode *src, supernode *dest, cgraph_edge *cedge)
void dump_dot_to_pp(pretty_printer *pp, const dump_args_t &) const
supernode * get_node_for_function_entry(const function &fun) const
Definition supergraph.h:114
function_to_num_snodes_t m_function_to_num_snodes
Definition supergraph.h:227
cfg_superedge * get_edge_for_cfg_edge(edge e) const
Definition supergraph.h:155
call_superedge * add_call_superedge(supernode *src, supernode *dest, cgraph_edge *cedge)
bb_to_node_t m_bb_to_initial_node
Definition supergraph.h:200
supernode * get_supernode_for_stmt(const gimple *stmt) const
Definition supergraph.h:161
ordered_hash_map< cgraph_edge *, superedge * > cgraph_edge_to_intraproc_superedge_t
Definition supergraph.h:220
void dump_dot_to_file(FILE *fp, const dump_args_t &) const
cgraph_edge_to_return_superedge_t m_cgraph_edge_to_return_superedge
Definition supergraph.h:217
call_superedge * get_edge_for_call(cgraph_edge *edge) const
Definition supergraph.h:137
ordered_hash_map< ::edge, cfg_superedge * > cfg_edge_to_cfg_superedge_t
Definition supergraph.h:208
void dump_dot(const char *path, const dump_args_t &) const
return_superedge * get_edge_for_return(cgraph_edge *edge) const
Definition supergraph.h:143
supernode * add_node(function *fun, basic_block bb, gcall *returning_call, gimple_seq phi_nodes)
saved_uids m_stmt_uids
Definition supergraph.h:229
cgraph_edge_to_node_t m_cgraph_edge_to_caller_prev_node
Definition supergraph.h:204
hash_map< const function *, unsigned > function_to_num_snodes_t
Definition supergraph.h:226
Definition supergraph.h:235
bool entry_p() const
Definition supergraph.h:245
gimple * get_last_stmt() const
Definition supergraph.h:283
gcall * get_final_call() const
Definition supergraph.h:290
location_t get_end_location() const
gphi_iterator start_phis()
Definition supergraph.h:264
const basic_block m_bb
Definition supergraph.h:303
void dump_dot_id(pretty_printer *pp) const
gcall * get_returning_call() const
Definition supergraph.h:278
bool return_p() const
Definition supergraph.h:250
location_t get_start_location() const
void dump_dot(graphviz_out *gv, const dump_args_t &args) const override
gcall *const m_returning_call
Definition supergraph.h:304
unsigned int get_stmt_index(const gimple *stmt) const
std::unique_ptr< json::object > to_json() const
function * get_function() const
Definition supergraph.h:243
supernode(function *fun, basic_block bb, gcall *returning_call, gimple_seq phi_nodes, int index)
Definition supergraph.h:237
const int m_index
Definition supergraph.h:307
auto_vec< gimple * > m_stmts
Definition supergraph.h:306
gimple_seq m_phi_nodes
Definition supergraph.h:305
function *const m_fun
Definition supergraph.h:302
Definition supergraph.h:557
bool implicitly_created_default_p() const
const switch_cfg_superedge * dyn_cast_switch_cfg_superedge() const final override
Definition supergraph.h:561
const vec< tree > & get_case_labels() const
Definition supergraph.h:575
switch_cfg_superedge(supernode *src, supernode *dst, ::edge e)
void dump_label_to_pp(pretty_printer *pp, bool user_facing) const final override
gswitch * get_switch_stmt() const
Definition supergraph.h:570
auto_vec< tree > m_case_labels
Definition supergraph.h:580
node_t *const m_src
Definition digraph.h:71
auto_delete_vec< edge_t > m_edges
Definition digraph.h:105
auto_delete_vec< node_t > m_nodes
Definition digraph.h:104
Definition pretty-print.h:241
class edge_def * edge
Definition coretypes.h:352
union tree_node * tree
Definition coretypes.h:97
static struct string2counter_map map[debug_counter_number_of_counters]
Definition dbgcnt.cc:39
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2004
gimple_seq phi_nodes(const_basic_block bb)
Definition gimple.h:4645
basic_block gimple_bb(const gimple *g)
Definition gimple.h:1861
gimple_seq_node gimple_seq_first(gimple_seq s)
Definition gimple.h:1684
T as_a(U *p)
Definition is-a.h:253
T dyn_cast(U *p)
Definition is-a.h:280
Definition access-diagram.h:30
function * get_ultimate_function_for_cgraph_edge(cgraph_edge *edge)
supergraph_dot_flags
Definition supergraph.h:63
@ SUPERGRAPH_DOT_SHOW_BBS
Definition supergraph.h:64
cgraph_edge * supergraph_call_edge(function *fun, const gimple *stmt)
edge_kind
Definition supergraph.h:53
@ SUPEREDGE_RETURN
Definition supergraph.h:56
@ SUPEREDGE_CALL
Definition supergraph.h:55
@ SUPEREDGE_CFG_EDGE
Definition supergraph.h:54
@ SUPEREDGE_INTRAPROCEDURAL_CALL
Definition supergraph.h:57
i
Definition poly-int.h:776
Definition supergraph.h:76
dump_args_t(enum supergraph_dot_flags flags, const dot_annotator *node_annotator)
Definition supergraph.h:77
const dot_annotator * m_node_annotator
Definition supergraph.h:84
enum supergraph_dot_flags m_flags
Definition supergraph.h:83
Definition supergraph.h:71
supergraph graph_t
Definition supergraph.h:74
supercluster cluster_t
Definition supergraph.h:86
supernode node_t
Definition supergraph.h:72
superedge edge_t
Definition supergraph.h:73
Definition basic-block.h:117
Definition function.h:249
gimple_seq_node ptr
Definition gimple-iterator.h:30
basic_block bb
Definition gimple.h:277
Definition gimple-iterator.h:42
#define NULL
Definition system.h:50