From 98450d1989825f36cce3bfc35284236418b486db Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 19 Nov 2019 19:57:50 +0100 Subject: [PATCH] Remove unused parameter PROB in ipa-fnsummary.c * ipa-fnsummary.c (estimate_edge_size_and_time): Drop parameter PROB. (estimate_calls_size_and_time): Update. From-SVN: r278460 --- gcc/ChangeLog | 5 +++++ gcc/ipa-fnsummary.c | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 710f8dab674..170486a7196 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-18 Jan Hubicka + + * ipa-fnsummary.c (estimate_edge_size_and_time): Drop parameter PROB. + (estimate_calls_size_and_time): Update. + 2019-11-18 Jan Hubicka * ipa-inline.c (inlining_speedup): New function. diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c index a88f300d67d..a883325d763 100644 --- a/gcc/ipa-fnsummary.c +++ b/gcc/ipa-fnsummary.c @@ -2950,7 +2950,6 @@ estimate_edge_devirt_benefit (struct cgraph_edge *ie, static inline void estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size, sreal *time, - int prob, vec known_vals, vec known_contexts, vec known_aggs, @@ -2960,6 +2959,7 @@ estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size, int call_size = es->call_stmt_size; int call_time = es->call_stmt_time; int cur_size; + if (!e->callee && hints && e->maybe_hot_p () && estimate_edge_devirt_benefit (e, &call_size, &call_time, known_vals, known_contexts, known_aggs)) @@ -2968,12 +2968,8 @@ estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size, *size += cur_size; if (min_size) *min_size += cur_size; - if (!time) - ; - else if (prob == REG_BR_PROB_BASE) + if (time) *time += ((sreal)call_time) * e->sreal_frequency (); - else - *time += ((sreal)call_time * prob) * e->sreal_frequency (); } @@ -3019,7 +3015,7 @@ estimate_calls_size_and_time (struct cgraph_node *node, int *size, sowe do not need to compute probabilities. */ estimate_edge_size_and_time (e, size, es->predicate ? NULL : min_size, - time, REG_BR_PROB_BASE, + time, known_vals, known_contexts, known_aggs, hints); } @@ -3031,7 +3027,7 @@ estimate_calls_size_and_time (struct cgraph_node *node, int *size, || es->predicate->evaluate (possible_truths)) estimate_edge_size_and_time (e, size, es->predicate ? NULL : min_size, - time, REG_BR_PROB_BASE, + time, known_vals, known_contexts, known_aggs, hints); } -- 2.30.2