summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-05 12:18:21 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-05 12:18:21 +0000
commit2fcc7de2769b08b279306c388cf076f1792e9bb2 (patch)
treede9a668f46ced74154f835f5f30b6ae827337155
parent2bec85dcfa9cc6740deec823018c072a605f3b90 (diff)
downloadgcc-2fcc7de2769b08b279306c388cf076f1792e9bb2.tar.gz
* tree-inline.c (fold_marked_statements): Update operand caches
and EH after folding git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120477 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-inline.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5bcf02a4def..4557a6fefb9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-04 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (fold_marked_statements): Update operand caches
+ and EH after folding
+
2007-01-04 Ian Lance Taylor <iant@google.com>
* c-common.c (check_function_nonnull): Whitespace fix.
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index bcfdd91b421..b3fc03fda7b 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2597,7 +2597,15 @@ fold_marked_statements (int first, struct pointer_set_t *statements)
for (bsi = bsi_start (BASIC_BLOCK (first));
!bsi_end_p (bsi); bsi_next (&bsi))
if (pointer_set_contains (statements, bsi_stmt (bsi)))
- fold_stmt (bsi_stmt_ptr (bsi));
+ {
+ tree old_stmt = bsi_stmt (bsi);
+ if (fold_stmt (bsi_stmt_ptr (bsi)))
+ {
+ update_stmt (bsi_stmt (bsi));
+ if (maybe_clean_or_replace_eh_stmt (old_stmt, bsi_stmt (bsi)))
+ tree_purge_dead_eh_edges (BASIC_BLOCK (first));
+ }
+ }
}
}