* tree-optimize.c (execute_fixup_cfg): Purge dead abnormal call edges
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 2010 17:30:10 +0000 (17:30 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 2010 17:30:10 +0000 (17:30 +0000)
if there is a call statement to pure or const function in the block.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165730 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-optimize.c

index a4a70f4..e3a4cab 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-20  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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  <pkoning@equallogic.com>
 
        Fix several build errors for pdp11 target.
index 9b4973f..f5a35ad 100644 (file)
@@ -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;