From 4244a86e669bb667e282329e6c1015de56ead9ea Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 20 Oct 2010 17:30:10 +0000 Subject: [PATCH] tree-optimize.c (execute_fixup_cfg): Purge dead abnormal call edges if there is a call statement to pure or const... * tree-optimize.c (execute_fixup_cfg): Purge dead abnormal call edges if there is a call statement to pure or const function in the block. From-SVN: r165730 --- gcc/ChangeLog | 5 +++++ gcc/tree-optimize.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4a70f48dd4c..e3a4cab08147 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-20 Eric Botcazou + + * tree-optimize.c (execute_fixup_cfg): Purge dead abnormal call edges + if there is a call statement to pure or const function in the block. + 2010-10-20 Paul Koning Fix several build errors for pdp11 target. diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 9b4973f3bb04..f5a35ad4d248 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -271,13 +271,16 @@ execute_fixup_cfg (void) int flags = gimple_call_flags (stmt); if (flags & (ECF_CONST | ECF_PURE | ECF_LOOPING_CONST_OR_PURE)) { + if (gimple_purge_dead_abnormal_call_edges (bb)) + todo |= TODO_cleanup_cfg; + if (gimple_in_ssa_p (cfun)) { todo |= TODO_update_ssa | TODO_cleanup_cfg; update_stmt (stmt); } } - + if (flags & ECF_NORETURN && fixup_noreturn_call (stmt)) todo |= TODO_cleanup_cfg;