diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-29 16:41:35 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-29 16:41:35 +0000 |
commit | 11b73810a1c6d07ba5957a462549785a6c9165ea (patch) | |
tree | 9296bef7d6851c797bb4189695298388ef9bef1d /gcc/ipa-prop.c | |
parent | a65f4f8eec224427fa4214b20d57e96c9043ef1f (diff) | |
download | gcc-11b73810a1c6d07ba5957a462549785a6c9165ea.tar.gz |
* cgraph.c (cgraph_remove_node): Do not remove nested nodes.
* cgraph.h (cgraph_maybe_hot_edge_p): Declare.
* ipa-cp.c (n_cloning_candidates): New static variable.
(ipcp_print_profile_data, ipcp_function_scale_print): Forward declare.
(ipcp_print_all_lattices): Improve debug output.
(ipcp_cloning_candidate_p): New function.
(ipcp_initialize_node_lattices): Use it.
(ipcp_init_stage): Do only analyzis here; prettier debug output.
(ipcp_propagate_stage): Prettier debug output.
(ipcp_iterate_stage): Initialize latices here; prettier debug output.
(ipcp_print_all_structures): Remove.
(ipcp_need_redirect_p): Test !n_cloning_candidates.
(ipcp_insert_stage): Prettier debug output; call
cgraph_remove_unreachable_nodes before propagating.
(pass_ipa_cp): Schedule function removal pass.
* ipa-inline.c (inline_indirect_intraprocedural_analysis): Better
debug output.
(cgraph_maybe_hot_edge_p): Move to ...
* predict.c (cgraph_maybe_hot_edge_p) ... here.
* opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New.
(common_handle_option): Set them; enable ipa-cp when profiling.
* ipa-prop.c (ipa_print_node_jump_functions): Prettier output.
(ipa_print_all_jump_functions): Likewise.
(ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove.
(ipa_print_node_params, ipa_print_all_params): New.
* ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags,
ipa_print_all_param_flags): Remove.
(ipa_print_node_params, ipa_print_all_params): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 53 |
1 files changed, 14 insertions, 39 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 9a31b024113..ffbf3adb668 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -255,13 +255,13 @@ ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node) struct ipa_jump_func *jump_func; enum jump_func_type type; - fprintf (f, "JUMP FUNCTIONS OF CALLER %s:\n", cgraph_node_name (node)); + fprintf (f, " Jump functions of caller %s:\n", cgraph_node_name (node)); for (cs = node->callees; cs; cs = cs->next_callee) { if (!ipa_edge_args_info_available_for_edge_p (cs)) continue; - fprintf (f, "callsite %s ", cgraph_node_name (node)); + fprintf (f, " callsite %s ", cgraph_node_name (node)); fprintf (f, "-> %s :: \n", cgraph_node_name (cs->callee)); count = ipa_get_cs_argument_count (IPA_EDGE_REF (cs)); @@ -270,7 +270,7 @@ ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node) jump_func = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), i); type = jump_func->type; - fprintf (f, " param %d: ", i); + fprintf (f, " param %d: ", i); if (type == IPA_UNKNOWN) fprintf (f, "UNKNOWN\n"); else if (type == IPA_CONST) @@ -303,7 +303,7 @@ ipa_print_all_jump_functions (FILE *f) { struct cgraph_node *node; - fprintf (f, "\nCALLSITE PARAM PRINT\n"); + fprintf (f, "\nJump functions:\n"); for (node = cgraph_nodes; node; node = node->next) { ipa_print_node_jump_functions (f, node); @@ -1207,48 +1207,23 @@ free_all_ipa_structures_after_iinln (void) /* Print ipa_tree_map data structures of all functions in the callgraph to F. */ void -ipa_print_all_tree_maps (FILE * f) +ipa_print_node_params (FILE * f, struct cgraph_node *node) { int i, count; tree temp; - struct cgraph_node *node; - - fprintf (f, "\nPARAM TREE MAP PRINT\n"); - for (node = cgraph_nodes; node; node = node->next) - { - struct ipa_node_params *info; - - if (!node->analyzed) - continue; - info = IPA_NODE_REF (node); - fprintf (f, "function %s Trees :: \n", cgraph_node_name (node)); - count = ipa_get_param_count (info); - for (i = 0; i < count; i++) - { - temp = ipa_get_ith_param (info, i); - if (TREE_CODE (temp) == PARM_DECL) - fprintf (f, " param [%d] : %s\n", i, - (*lang_hooks.decl_printable_name) (temp, 2)); - } - - } -} - -/* Print param_flags data structures of the NODE to F. */ -void -ipa_print_node_param_flags (FILE * f, struct cgraph_node *node) -{ - int i, count; struct ipa_node_params *info; if (!node->analyzed) return; info = IPA_NODE_REF (node); - fprintf (f, "PARAM FLAGS of function %s: \n", cgraph_node_name (node)); + fprintf (f, " function %s Trees :: \n", cgraph_node_name (node)); count = ipa_get_param_count (info); for (i = 0; i < count; i++) { - fprintf (f, " param %d flags:", i); + temp = ipa_get_ith_param (info, i); + if (TREE_CODE (temp) == PARM_DECL) + fprintf (f, " param %d : %s", i, + (*lang_hooks.decl_printable_name) (temp, 2)); if (ipa_is_ith_param_modified (info, i)) fprintf (f, " modified"); if (ipa_is_ith_param_called (info, i)) @@ -1257,14 +1232,14 @@ ipa_print_node_param_flags (FILE * f, struct cgraph_node *node) } } -/* Print param_flags data structures of all functions in the +/* Print ipa_tree_map data structures of all functions in the callgraph to F. */ void -ipa_print_all_param_flags (FILE * f) +ipa_print_all_params (FILE * f) { struct cgraph_node *node; - fprintf (f, "\nIPA PARAM FLAGS DUMP\n"); + fprintf (f, "\nFunction parameters:\n"); for (node = cgraph_nodes; node; node = node->next) - ipa_print_node_param_flags (f, node); + ipa_print_node_params (f, node); } |