This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix ia64 bootstrap


Stage1 building insn-recog.c with -g would result in a reference to
a deleted label from debug info.  The problem being that we'd lose
the deleted label note, and so we'd have an undefined reference.

We lost the note because it was outside of any basic block, after
the last barrier.  The following keeps track of the tail of the
function and reattaches it appropriately.


r~


        * bb-reorder.c (function_tail_eff_head): New.
        (record_effective_endpoints): Set it.
        (fixup_reorder_chain): Use it.

Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.33
diff -c -p -d -r1.33 bb-reorder.c
*** bb-reorder.c	2001/08/22 14:34:42	1.33
--- bb-reorder.c	2001/08/29 09:27:48
*************** typedef struct reorder_block_def
*** 171,176 ****
--- 171,179 ----
  
  #define RBI(BB)	((reorder_block_def) (BB)->aux)
  
+ /* Holds the interesting trailing notes for the function.  */
+ static rtx function_tail_eff_head;
+ 
  
  /* Local function prototypes.  */
  static rtx skip_insns_after_block	PARAMS ((basic_block));
*************** record_effective_endpoints ()
*** 307,312 ****
--- 310,316 ----
        RBI (bb)->eff_end = end;
        next_insn = NEXT_INSN (end);
      }
+   function_tail_eff_head = next_insn;
  }
  
  
*************** fixup_reorder_chain ()
*** 580,587 ****
        last_bb = bb;
        bb = RBI (bb)->next;
      }
!   NEXT_INSN (RBI (last_bb)->eff_end) = NULL_RTX;
!   set_last_insn (RBI (last_bb)->eff_end);
  
    /* Now add jumps and labels as needed to match the blocks new
       outgoing edges.  */
--- 584,601 ----
        last_bb = bb;
        bb = RBI (bb)->next;
      }
! 
!   {
!     rtx insn = RBI (last_bb)->eff_end;
! 
!     NEXT_INSN (insn) = function_tail_eff_head;
!     if (function_tail_eff_head)
!       PREV_INSN (function_tail_eff_head) = insn;
! 
!     while (NEXT_INSN (insn))
!       insn = NEXT_INSN (insn);
!     set_last_insn (insn);
!   }
  
    /* Now add jumps and labels as needed to match the blocks new
       outgoing edges.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]