Commit 3c04921b by Richard Guenther Committed by Richard Biener

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
parent a8d56c30
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> 2012-06-26 Steven Bosscher <steven@gcc.gnu.org>
PR other/33190 PR other/33190
......
...@@ -3611,15 +3611,12 @@ estimate_num_insns (gimple stmt, eni_weights *weights) ...@@ -3611,15 +3611,12 @@ estimate_num_insns (gimple stmt, eni_weights *weights)
} }
cost = node ? weights->call_cost : weights->indirect_call_cost; 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)) tree arg = gimple_call_arg (stmt, i);
cost += estimate_move_cost (TREE_TYPE (gimple_call_lhs (stmt))); cost += estimate_move_cost (TREE_TYPE (arg));
for (i = 0; i < gimple_call_num_args (stmt); i++)
{
tree arg = gimple_call_arg (stmt, i);
cost += estimate_move_cost (TREE_TYPE (arg));
}
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment