aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-ssa-ccp.c16
2 files changed, 16 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6472431..9b2dba2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,11 @@
2004-11-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ Diego Novillo <dnovillo@redhat.com>
+
+ PR/18662, also backported from tree-cleanup-branch.
+ * tree-ssa-ccp.c (substitute_and_fold): If replaced anything,
+ always call maybe_clean_eh_stmt and modify_stmt.
+
+2004-11-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
PR/18664
* tree-ssa-operands.c (build_ssa_operands, case MODIFY_EXPR):
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 911e573..c530ede 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -579,16 +579,18 @@ substitute_and_fold (void)
{
bool changed = fold_stmt (bsi_stmt_ptr (i));
stmt = bsi_stmt(i);
+
/* If we folded a builtin function, we'll likely
need to rename VDEFs. */
if (replaced_address || changed)
- {
- mark_new_vars_to_rename (stmt, vars_to_rename);
- if (maybe_clean_eh_stmt (stmt))
- tree_purge_dead_eh_edges (bb);
- }
- else
- modify_stmt (stmt);
+ mark_new_vars_to_rename (stmt, vars_to_rename);
+
+ /* If we cleaned up EH information from the statement,
+ remove EH edges. */
+ if (maybe_clean_eh_stmt (stmt))
+ tree_purge_dead_eh_edges (bb);
+
+ modify_stmt (stmt);
}
if (dump_file && (dump_flags & TDF_DETAILS))