summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-29 16:41:35 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-29 16:41:35 +0000
commit11b73810a1c6d07ba5957a462549785a6c9165ea (patch)
tree9296bef7d6851c797bb4189695298388ef9bef1d /gcc/ipa-inline.c
parenta65f4f8eec224427fa4214b20d57e96c9043ef1f (diff)
downloadgcc-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-inline.c')
-rw-r--r--gcc/ipa-inline.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 94062f2a0f2..a85a8a3be6b 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -468,26 +468,6 @@ cgraph_recursive_inlining_p (struct cgraph_node *to,
return recursive;
}
-/* Return true if the call can be hot. */
-static bool
-cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
-{
- if (profile_info && flag_branch_probabilities
- && (edge->count
- <= profile_info->sum_max / PARAM_VALUE (HOT_BB_COUNT_FRACTION)))
- return false;
- if (lookup_attribute ("cold", DECL_ATTRIBUTES (edge->callee->decl))
- || lookup_attribute ("cold", DECL_ATTRIBUTES (edge->caller->decl)))
- return false;
- if (lookup_attribute ("hot", DECL_ATTRIBUTES (edge->caller->decl)))
- return true;
- if (flag_guess_branch_prob
- && edge->frequency < (CGRAPH_FREQ_MAX
- / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION)))
- return false;
- return true;
-}
-
/* A cost model driving the inlining heuristics in a way so the edges with
smallest badness are inlined first. After each inlining is performed
the costs of all caller edges of nodes affected are recomputed so the
@@ -1646,9 +1626,6 @@ inline_indirect_intraprocedural_analysis (struct cgraph_node *node)
}
ipa_analyze_params_uses (node);
- if (dump_file)
- ipa_print_node_param_flags (dump_file, node);
-
if (!flag_ipa_cp)
for (cs = node->callees; cs; cs = cs->next_callee)
{
@@ -1657,7 +1634,10 @@ inline_indirect_intraprocedural_analysis (struct cgraph_node *node)
}
if (dump_file)
- ipa_print_node_jump_functions (dump_file, node);
+ {
+ ipa_print_node_params (dump_file, node);
+ ipa_print_node_jump_functions (dump_file, node);
+ }
}
/* Note function body size. */