diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-30 05:16:36 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-30 05:16:36 +0000 |
commit | bc4381667a31bd5f1e677d64c789b1e959df00d5 (patch) | |
tree | a6b80dca8f72a2e7640e4d535901e42325b2a954 /gcc/tree-inline.c | |
parent | 1cd66bce1663eb648638d311b493de0dcc4146c3 (diff) | |
parent | 738c50b853f5ba0eaf93e23f6d29cbac761eef9e (diff) | |
download | gcc-reload-v2a.tar.gz |
Weekly merge from trunk. No regressions.reload-v2a
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/reload-v2a@181834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 7daa9d2f513..22604030d4a 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3521,7 +3521,7 @@ estimate_num_insns (gimple stmt, eni_weights *weights) case GIMPLE_CALL: { tree decl = gimple_call_fndecl (stmt); - struct cgraph_node *node; + struct cgraph_node *node = NULL; /* Do not special case builtins where we see the body. This just confuse inliner. */ @@ -3556,7 +3556,7 @@ estimate_num_insns (gimple stmt, eni_weights *weights) } } - cost = weights->call_cost; + cost = node ? weights->call_cost : weights->indirect_call_cost; if (gimple_call_lhs (stmt)) cost += estimate_move_cost (TREE_TYPE (gimple_call_lhs (stmt))); for (i = 0; i < gimple_call_num_args (stmt); i++) @@ -3674,6 +3674,7 @@ void init_inline_once (void) { eni_size_weights.call_cost = 1; + eni_size_weights.indirect_call_cost = 3; eni_size_weights.target_builtin_call_cost = 1; eni_size_weights.div_mod_cost = 1; eni_size_weights.omp_cost = 40; @@ -3686,6 +3687,7 @@ init_inline_once (void) underestimating the cost does less harm than overestimating it, so we choose a rather small value here. */ eni_time_weights.call_cost = 10; + eni_time_weights.indirect_call_cost = 15; eni_time_weights.target_builtin_call_cost = 1; eni_time_weights.div_mod_cost = 10; eni_time_weights.omp_cost = 40; |