aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-06-26 13:08:50 +0000
committerRichard Guenther <rguenther@suse.de>2012-06-26 13:08:50 +0000
commitbb1ad1f5948c52fef8a4f255a1f50b3342223ca9 (patch)
tree80ec3100ebd8c43321135ce4ab1b2a374afedbde /gcc/tree-inline.c
parentebb9988bd44fc8f07f2445a78546d91e03f59dcf (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@188985 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c13
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;
}