Commit f6dbed32 by Jakub Jelinek Committed by Jakub Jelinek

Revert

	2011-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/51481
	* gimple-fold.c (gimple_fold_call): Call
	maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
	edges, but gimple_fold_builtin result can't throw.

From-SVN: r182284
parent ea85edfe
2011-12-13 Jakub Jelinek <jakub@redhat.com>
Revert
2011-12-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.
2011-12-13 Jakub Jelinek <jakub@redhat.com>
Michael Matz <matz@suse.de>
PR tree-optimization/51117
......@@ -1117,21 +1117,10 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
if (callee && DECL_BUILT_IN (callee))
{
tree result = gimple_fold_builtin (stmt);
if (result
/* Disallow EH edge removal here. We can't call
gimple_purge_dead_eh_edges here. */
&& (lookup_stmt_eh_lp (stmt) == 0
|| tree_could_throw_p (result)))
if (result)
{
if (!update_call_from_tree (gsi, result))
gimplify_and_update_call_from_tree (gsi, result);
if (!gsi_end_p (*gsi))
{
gimple new_stmt = gsi_stmt (*gsi);
bool update_eh ATTRIBUTE_UNUSED
= maybe_clean_or_replace_eh_stmt (stmt, new_stmt);
gcc_assert (!update_eh);
}
changed = true;
}
}
......
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