revert: tree-inline.c (estimate_num_insns): Estimate call cost for tailcalls properly.
authorRichard Guenther <rguenther@suse.de>
Tue, 26 Jun 2012 13:08:50 +0000 (13:08 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 26 Jun 2012 13:08:50 +0000 (13:08 +0000)
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

gcc/ChangeLog
gcc/tree-inline.c

index 206a3ad2c1f12102d74b908b9cccc43cffb68558..d43c6a8838ea6998894d526a90481cd30fa721ea 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2012-06-26  Steven Bosscher  <steven@gcc.gnu.org>
 
        PR other/33190
index 7a8b6a86b1328af2a63d0e9fecf8769433e139d3..6746296ddadf94b0a451976ee8f14ffb0c24fac0 100644 (file)
@@ -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;
       }