aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-08-19 07:55:20 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2012-08-19 05:55:20 +0000
commit37678631a8a4464bc16c8d02dfaa4086f6038cb1 (patch)
tree032d8e752b8a993f1aa19d59d320266d25238378 /gcc/predict.c
parentecfdae6f116a6c154d57a4fced789d6f1b396c07 (diff)
downloadgcc-37678631a8a4464bc16c8d02dfaa4086f6038cb1.zip
gcc-37678631a8a4464bc16c8d02dfaa4086f6038cb1.tar.gz
gcc-37678631a8a4464bc16c8d02dfaa4086f6038cb1.tar.bz2
re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO)
PR lto/45375 * ipa-inline.c (want_inline_small_function_p): Bypass inline limits for hinted functions. (edge_badness): Dump hints; decrease badness for hinted funcitons. * ipa-inline.h (enum inline_hints_vals): New enum. (inline_hints): New type. (edge_growth_cache_entry): Add hints. (dump_inline_summary): Update. (dump_inline_hints): Declare. (do_estimate_edge_hints): Declare. (estimate_edge_hints): New inline function. (reset_edge_growth_cache): Update. * predict.c (cgraph_maybe_hot_edge_p): Do not ice on indirect edges. * ipa-inline-analysis.c (dump_inline_hints): New function. (estimate_edge_devirt_benefit): Return true when function should be hinted. (estimate_calls_size_and_time): New hints argument; set it when devritualization happens. (estimate_node_size_and_time): New hints argument. (do_estimate_edge_time): Cache hints. (do_estimate_edge_growth): Update. (do_estimate_edge_hints): New function From-SVN: r190509
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index c884d38..e1a064d 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -165,10 +165,12 @@ cgraph_maybe_hot_edge_p (struct cgraph_edge *edge)
<= profile_info->sum_max / PARAM_VALUE (HOT_BB_COUNT_FRACTION)))
return false;
if (edge->caller->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
- || edge->callee->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
+ || (edge->callee
+ && edge->callee->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED))
return false;
if (edge->caller->frequency > NODE_FREQUENCY_UNLIKELY_EXECUTED
- && edge->callee->frequency <= NODE_FREQUENCY_EXECUTED_ONCE)
+ && (edge->callee
+ && edge->callee->frequency <= NODE_FREQUENCY_EXECUTED_ONCE))
return false;
if (optimize_size)
return false;