aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 9f7b2a1..1d79ec4 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -175,10 +175,11 @@ do_estimate_edge_time (struct cgraph_edge *edge)
edges and for those we disable size limits. Don't do that when
probability that caller will call the callee is low however, since it
may hurt optimization of the caller's hot path. */
- if (edge->count && edge->maybe_hot_p ()
- && (edge->count * 2
+ if (edge->count.initialized_p () && edge->maybe_hot_p ()
+ && (edge->count.apply_scale (2, 1)
> (edge->caller->global.inlined_to
- ? edge->caller->global.inlined_to->count : edge->caller->count)))
+ ? edge->caller->global.inlined_to->count
+ : edge->caller->count)))
hints |= INLINE_HINT_known_hot;
known_vals.release ();