aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-iterator.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-05 09:43:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-05 09:43:48 +0000
commitb5b3ec3e6ebe5b7a07654d94f53f97b0a8cca050 (patch)
tree6258ff245914afce423859c9d6e66227cf605076 /gcc/gimple-iterator.c
parent4e48b6f14dd57f48d042ebc3a47529963da69fdf (diff)
downloadgcc-b5b3ec3e6ebe5b7a07654d94f53f97b0a8cca050.zip
gcc-b5b3ec3e6ebe5b7a07654d94f53f97b0a8cca050.tar.gz
gcc-b5b3ec3e6ebe5b7a07654d94f53f97b0a8cca050.tar.bz2
gimple-iterator.c (gsi_remove): Return whether EH edges need to be cleanup.
2012-04-05 Richard Guenther <rguenther@suse.de> * gimple-iterator.c (gsi_remove): Return whether EH edges need to be cleanup. * gimple.h (gsi_remove): Adjust. * tree-ssa-operands.c (unlink_stmt_vdef): Optimize. * tree-ssa-dom.c (optimize_stmt): Use gsi_remove result. * tree-ssa-dse.c (dse_optimize_stmt): Likewise. * tree-ssa-forwprop.c (remove_prop_source_from_use): Likewise. * tree-ssa-math-opts.c (execute_optimize_widening_mul): Likewise. * tree-ssa-pre.c (eliminate): Likewise. From-SVN: r186159
Diffstat (limited to 'gcc/gimple-iterator.c')
-rw-r--r--gcc/gimple-iterator.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c
index f5a1d26..e387c16 100644
--- a/gcc/gimple-iterator.c
+++ b/gcc/gimple-iterator.c
@@ -499,13 +499,15 @@ gsi_insert_after (gimple_stmt_iterator *i, gimple stmt,
REMOVE_PERMANENTLY is true when the statement is going to be removed
from the IL and not reinserted elsewhere. In that case we remove the
statement pointed to by iterator I from the EH tables, and free its
- operand caches. Otherwise we do not modify this information. */
+ operand caches. Otherwise we do not modify this information. Returns
+ true whether EH edge cleanup is required. */
-void
+bool
gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
{
gimple_seq_node cur, next, prev;
gimple stmt = gsi_stmt (*i);
+ bool require_eh_edge_purge = false;
if (gimple_code (stmt) != GIMPLE_PHI)
insert_debug_temps_for_defs (i);
@@ -517,7 +519,7 @@ gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
if (remove_permanently)
{
- remove_stmt_from_eh_lp (stmt);
+ require_eh_edge_purge = remove_stmt_from_eh_lp (stmt);
gimple_remove_stmt_histograms (cfun, stmt);
}
@@ -537,6 +539,8 @@ gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
gimple_seq_set_last (i->seq, prev);
i->ptr = next;
+
+ return require_eh_edge_purge;
}