summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-29 01:15:39 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-29 01:15:39 +0000
commitb12821c4f5061f815f9f2bd42df997e7aed5bf24 (patch)
tree1eb3291507d8b64d114e5f1bbf2532b0100e5cd1 /gcc/tree-ssa-ccp.c
parenta065a588e1c6f2e8724d4e1c0ed8995c178cce3e (diff)
downloadgcc-b12821c4f5061f815f9f2bd42df997e7aed5bf24.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 911e57350ad..c530eded8c6 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))