static void merge_callee_local_info (struct cgraph_node *target, struct cgraph_node *x) { struct cgraph_edge *e; ipa_reference_local_vars_info_t x_l = get_reference_vars_info_from_cgraph (target)->local; /* Make the world safe for tail recursion. */ struct ipa_dfs_info *node_info = x->aux; if (node_info->aux) return; node_info->aux = x; for (e = x->callees; e; e = e->next_callee) { struct cgraph_node *y = e->callee; if (y->global.inlined_to) { ipa_reference_vars_info_t y_info; ipa_reference_local_vars_info_t y_l; struct cgraph_node* orig_y = y; y = cgraph_master_clone (y); if (y) { y_info = get_reference_vars_info_from_cgraph (y); y_l = y_info->local; if (x_l != y_l) { bitmap_ior_into (x_l->statics_read, y_l->statics_read); bitmap_ior_into (x_l->statics_written, y_l->statics_written); } x_l->calls_read_all |= y_l->calls_read_all; x_l->calls_write_all |= y_l->calls_write_all; merge_callee_local_info (target, y); } else { fprintf(stderr, "suspect inlining of "); dump_cgraph_node (stderr, orig_y); fprintf(stderr, "\ninto "); dump_cgraph_node (stderr, target); dump_cgraph (stderr); gcc_assert(false); } } } node_info->aux = NULL; }
void dump_symtab_node (FILE *f, symtab_node node) { if (symtab_function_p (node)) dump_cgraph_node (f, cgraph (node)); else if (symtab_variable_p (node)) dump_varpool_node (f, varpool (node)); }
void dump_symtab_node (FILE *f, symtab_node node) { if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) dump_cgraph_node (f, cnode); else if (varpool_node *vnode = dyn_cast <varpool_node> (node)) dump_varpool_node (f, vnode); }
void ipa_print_order (FILE* out, const char * note, struct cgraph_node** order, int count) { int i; fprintf (out, "\n\n ordered call graph: %s\n", note); for (i = count - 1; i >= 0; i--) dump_cgraph_node (dump_file, order[i]); fprintf (out, "\n"); fflush (out); }