From 24bc216e687db2ac9c74a3c421e6b085e6705825 Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 14 Mar 2007 01:26:00 +0000 Subject: * ipa-inline.c (cgraph_maybe_hot_edge_p): Look for hot/cold attributes, when profile esitmate is present, calls with very low frequency are cold. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122898 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-inline.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/ipa-inline.c') diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 67ca5fdee24..04306aaa7e0 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -472,6 +472,15 @@ cgraph_maybe_hot_edge_p (struct cgraph_edge *edge) && (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; } -- cgit v1.2.1