flow.c (split_edge): Set JUMP_LABEL field.
authorAndrew MacLeod <amacleod@cygnus.com>
Tue, 10 Aug 1999 14:46:16 +0000 (14:46 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Tue, 10 Aug 1999 14:46:16 +0000 (14:46 +0000)
* flow.c (split_edge): Set JUMP_LABEL field.
(commit_one_edge_insertion): Set head correctly for insert_before.
When inserting insns, update insn block numbers if allocated.

From-SVN: r28646

gcc/ChangeLog
gcc/flow.c

index 8b2a3db3d3cf289fa0b9e6188144d706354dbe43..46c1d3c11231af6187b504ea521803ef244e4940 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug 10 10:39:31 EDT 1999  Andrew MacLeod  <amacleod@cygnus.com>
+
+       * flow.c (split_edge): Set JUMP_LABEL field.
+       (commit_one_edge_insertion): Set head correctly for insert_before.
+       When inserting insns, update insn block numbers if allocated.
+
 Tue Aug 10 09:26:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * dwarf2out.c (dwarf2out_frame_debug_expr, add_incomplete_type,
index 47f037c3d50521c8ba758dda739d8538d7128505..78384162ca1a4c5318b3e71bddb0d23524ed71fc 100644 (file)
@@ -1260,6 +1260,7 @@ split_edge (edge_in)
          emit_barrier_after (pos);
 
          /* ... let jump know that label is in use, ...  */
+         JUMP_LABEL (pos) = old_succ->head;
          ++LABEL_NUSES (old_succ->head);
          
          /* ... and clear fallthru on the outgoing edge.  */
@@ -1435,11 +1436,20 @@ commit_one_edge_insertion (e)
   /* Now that we've found the spot, do the insertion.  */
   tmp = e->insns;
   e->insns = NULL_RTX;
+
+  /* Set the new block number for these insns, if structure is allocated.  */
+  if (basic_block_for_insn)
+    {
+      rtx i;
+      for (i = tmp; i != NULL_RTX; i = NEXT_INSN (i))
+       set_block_for_insn (i, bb);
+    }
+
   if (before)
     {
       emit_insns_before (tmp, before);
       if (before == bb->head)
-       bb->head = before;
+       bb->head = tmp;
     }
   else
     {