diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-04 17:57:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-04 17:57:29 +0000 |
commit | 48ff1d417d4c49525c09b013395e38dda8bd50fe (patch) | |
tree | ffb4ea05f14bc936b5dd3681e19b2aa3cee8c3bf /gcc/ipa-inline-analysis.c | |
parent | 144409bbbdb293946cea105115e0e329f633d333 (diff) | |
download | gcc-48ff1d417d4c49525c09b013395e38dda8bd50fe.tar.gz |
2014-01-04 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn rev206333 now in
stage 3; very unstable, xtramelt-ana-base don't compile
anymore...}}
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@206336 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index a570883bebc..ea2d0aab83f 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -1,5 +1,5 @@ /* Inlining decision heuristics. - Copyright (C) 2003-2013 Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. Contributed by Jan Hubicka This file is part of GCC. @@ -494,7 +494,7 @@ evaluate_predicate (struct predicate *p, clause_t possible_truths) static int predicate_probability (conditions conds, struct predicate *p, clause_t possible_truths, - vec<inline_param_summary_t> inline_param_summary) + vec<inline_param_summary> inline_param_summary) { int i; int combined_prob = REG_BR_PROB_BASE; @@ -2152,7 +2152,7 @@ param_change_prob (gimple stmt, int i) max = 1; EXECUTE_IF_SET_IN_BITMAP (info.bb_set, 0, index, bi) - max = MIN (max, BASIC_BLOCK (index)->frequency); + max = MIN (max, BASIC_BLOCK_FOR_FN (cfun, index)->frequency); BITMAP_FREE (info.bb_set); if (max < bb->frequency) @@ -2408,7 +2408,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early) nblocks = pre_and_rev_post_order_compute (NULL, order, false); for (n = 0; n < nblocks; n++) { - bb = BASIC_BLOCK (order[n]); + bb = BASIC_BLOCK_FOR_FN (cfun, order[n]); freq = compute_call_stmt_bb_frequency (node->decl, bb); /* TODO: Obviously predicates can be propagated down across CFG. */ @@ -2502,7 +2502,8 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early) } - if (is_gimple_call (stmt)) + if (is_gimple_call (stmt) + && !gimple_call_internal_p (stmt)) { struct cgraph_edge *edge = cgraph_edge (node, stmt); struct inline_edge_summary *es = inline_edge_summary (edge); @@ -2795,6 +2796,11 @@ compute_inline_parameters (struct cgraph_node *node, bool early) } estimate_function_body_sizes (node, early); + for (e = node->callees; e; e = e->next_callee) + if (symtab_comdat_local_p (e->callee)) + break; + node->calls_comdat_local = (e != NULL); + /* Inlining characteristics are maintained by the cgraph_mark_inline. */ info->time = info->self_time; info->size = info->self_size; @@ -2982,7 +2988,7 @@ estimate_node_size_and_time (struct cgraph_node *node, vec<ipa_agg_jump_function_p> known_aggs, int *ret_size, int *ret_time, inline_hints *ret_hints, - vec<inline_param_summary_t> + vec<inline_param_summary> inline_param_summary) { struct inline_summary *info = inline_summary (node); |