diff options
author | Richard Guenther <rguenther@suse.de> | 2012-06-26 13:08:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-06-26 13:08:50 +0000 |
commit | 3c04921bfd0e4d1d122d42e57d4d95a44eeef857 (patch) | |
tree | 80ec3100ebd8c43321135ce4ab1b2a374afedbde /gcc/tree-inline.c | |
parent | a8d56c302b917b71a6688c8cd65a69513e101b93 (diff) | |
download | gcc-3c04921bfd0e4d1d122d42e57d4d95a44eeef857.tar.gz |
revert: tree-inline.c (estimate_num_insns): Estimate call cost for tailcalls properly.
2012-06-26 Richard Guenther <rguenther@suse.de>
Revert
2012-06-21 Richard Guenther <rguenther@suse.de>
* tree-inline.c (estimate_num_insns): Estimate call cost for
tailcalls properly.
From-SVN: r188985
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 7a8b6a86b13..6746296ddad 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3611,15 +3611,12 @@ estimate_num_insns (gimple stmt, eni_weights *weights) } cost = node ? weights->call_cost : weights->indirect_call_cost; - if (!gimple_call_tail_p (stmt)) + 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++) { - 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++) - { - tree arg = gimple_call_arg (stmt, i); - cost += estimate_move_cost (TREE_TYPE (arg)); - } + tree arg = gimple_call_arg (stmt, i); + cost += estimate_move_cost (TREE_TYPE (arg)); } break; } |