2004-11-03 Andrew MacLeod <amacleod@redhat.com>
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Nov 2004 18:56:35 +0000 (18:56 +0000)
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Nov 2004 18:56:35 +0000 (18:56 +0000)
PR tree-optimization/18270
* tree-outof-ssa.c (analyze_edges_for_bb): If a block has any incoming
abnormal edges, simply commit any pending stmts on all incoming edges.

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

gcc/ChangeLog
gcc/tree-outof-ssa.c

index accb133..e8208f5 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-03  Andrew MacLeod  <amacleod@redhat.com>
+
+       PR tree-optimization/18270
+       * tree-outof-ssa.c (analyze_edges_for_bb): If a block has incoming
+       abnormal edges, commit all pending stmts on incoming edges.
+
 2004-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * tree-ssa-loop-ivopts.c (get_address_cost): Offset zero does not
index 6d33c47..074ca5b 100644 (file)
@@ -2024,6 +2024,25 @@ analyze_edges_for_bb (basic_block bb, FILE *debug_file)
   bool is_label;
 
   count = 0;
+
+  /* Blocks which contain at least one abnormal edge cannot use 
+     make_forwarder_block.  Look for these blocks, and commit any PENDING_STMTs
+     found on edges in these block.  */
+  have_opportunity = true;
+  FOR_EACH_EDGE (e, ei, bb->preds)
+    if (e->flags & EDGE_ABNORMAL)
+      {
+        have_opportunity = false;
+       break;
+      }
+
+  if (!have_opportunity)
+    {
+      FOR_EACH_EDGE (e, ei, bb->preds)
+       if (PENDING_STMT (e))
+         bsi_commit_one_edge_insert (e, NULL);
+      return false;
+    }
   /* Find out how many edges there are with interesting pending stmts on them.  
      Commit the stmts on edges we are not interested in.  */
   FOR_EACH_EDGE (e, ei, bb->preds)