This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] decide edge's hotness when there is profile info
- From: Dehao Chen <dehao at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, David Li <davidxl at google dot com>
- Date: Mon, 14 Oct 2013 09:08:53 -0700
- Subject: [PATCH] decide edge's hotness when there is profile info
- Authentication-results: sourceware.org; auth=none
This patch forces to use profile info to check if an edge is hot when
profile is available.
Bootstrapped and passed regression tests.
OK for trunk?
Thanks,
Dehao
gcc/ChangeLog:
2013-10-14 Dehao Chen <dehao@google.com>
* predict.c(cgraph_maybe_hot_edge_p): Decide edge's hotness from profile.
Index: gcc/predict.c
===================================================================
--- gcc/predict.c (revision 203568)
+++ gcc/predict.c (working copy)
@@ -185,10 +185,8 @@ maybe_hot_bb_p (struct function *fun, const_basic_
bool
cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
{
- if (profile_info && flag_branch_probabilities
- && !maybe_hot_count_p (NULL,
- edge->count))
- return false;
+ if (profile_info && flag_branch_probabilities)
+ return maybe_hot_count_p (NULL, edge->count);
if (edge->caller->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
|| (edge->callee
&& edge->callee->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED))