summaryrefslogtreecommitdiff
path: root/gcc/gimple-iterator.c
diff options
context:
space:
mode:
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 f5a1d26dc27..e387c16e31a 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;
}