From 3c04921bfd0e4d1d122d42e57d4d95a44eeef857 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 26 Jun 2012 13:08:50 +0000 Subject: [PATCH] revert: tree-inline.c (estimate_num_insns): Estimate call cost for tailcalls properly. 2012-06-26 Richard Guenther Revert 2012-06-21 Richard Guenther * tree-inline.c (estimate_num_insns): Estimate call cost for tailcalls properly. From-SVN: r188985 --- gcc/ChangeLog | 8 ++++++++ gcc/tree-inline.c | 13 +++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 206a3ad2c1f..d43c6a8838e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-06-26 Richard Guenther + + Revert + 2012-06-21 Richard Guenther + + * tree-inline.c (estimate_num_insns): Estimate call cost for + tailcalls properly. + 2012-06-26 Steven Bosscher PR other/33190 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; } -- 2.30.2