diff options
Diffstat (limited to 'gcc/cgraph.cc')
-rw-r--r-- | gcc/cgraph.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index ac0f251..3f95ca1 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -3019,7 +3019,14 @@ cgraph_edge::maybe_hot_p (sreal scale) /* Use IPA count and if it s not available appy local heuristics. */ if (c.initialized_p ()) - return maybe_hot_count_p (NULL, c * scale); + { + /* A special case; AFDO zero means that function may quite possibly + be executed few times per execution. If scale is large, we still + want to consider the call hot. */ + if (c.quality () == AFDO) + c = c.force_nonzero (); + return maybe_hot_count_p (NULL, c * scale); + } if (!count.initialized_p ()) return true; cgraph_node *where = caller->inlined_to ? caller->inlined_to : caller; |