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]
Other format: [Raw text]

Get rid of NOTE_LINE_NUMBER infrastructure


Hi,
this patch cleans up the infrastructure for INSN_NOTEs after removal of line
number notes.  In particular:
  1) Now misnamed NOTE_LINE_NUMBER is now NOTE_KIND (for symmetry with
  REG_NOTE_KIND)
  2) 4th field of NOTEs is now unused.  We need to keep 5th around for
  code label replacement code and it is not big deal since we anyway
  need all INSN containers to be of same size (at least BARRIER is
  artifically bumped up in size)
  3) I've dropped squeeze_notes that is moving around block notes and
  was dead for a while, since block notes appears very late
  4) Code for handling line number notes was dropped from print-rtl and firends.
  5) SET_INSN_DELETED and NOTE_INSN_BASIC_BLOCK_P is now used more consistently
  replacing the unwound sequence
  6) I've dropped code from sh.c dealing with LOOP notes since it was dead
  since GCC 4.0.0 and no one complained
  7) emit_note and friends now take the enum insn_note as argument instead
  of line number
  8) NOTE_INSN_* enum now starts at 0 instead of -100.
  9) SET_INSN_DELETED is now used more consistenly (it was still present
  in backend code that would not compile with mapped locations)

It is long and mechanical too ;) I've inspected by hand each occurence
of NOTE_LINE_NUMBER by hand to see if it is still needed, hope I got it
right.

Bootstrapped/regtested i686-linux, I've also verified that sh-elf builds
(since there was quite few changes to sh).  I am testing ppc-linux and
ia64-linux.

:ADDPATCH middle-end:

Honza

	* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

Index: gengtype.c
===================================================================
*** gengtype.c	(revision 124446)
--- gengtype.c	(working copy)
*************** adjust_field_rtx_def (type_p t, options_
*** 1088,1093 ****
--- 1088,1095 ----
  		t = rtx_tp, subname = "rt_rtx";
  	      else if (i == NOTE && aindex == 4)
  		t = note_union_tp, subname = "";
+ 	      else if (i == NOTE && aindex == 5)
+ 		t = scalar_tp, subname = "rt_int";
  	      else if (i == NOTE && aindex >= 7)
  		t = scalar_tp, subname = "rt_int";
  	      else if (i == ADDR_DIFF_VEC && aindex == 4)
*************** adjust_field_rtx_def (type_p t, options_
*** 1167,1173 ****
  	  subfields->opt = nodot;
  	  if (t == note_union_tp)
  	    subfields->opt = create_option (subfields->opt, "desc",
! 					    "NOTE_LINE_NUMBER (&%0)");
  	  if (t == symbol_union_tp)
  	    subfields->opt = create_option (subfields->opt, "desc",
  					    "CONSTANT_POOL_ADDRESS_P (&%0)");
--- 1169,1175 ----
  	  subfields->opt = nodot;
  	  if (t == note_union_tp)
  	    subfields->opt = create_option (subfields->opt, "desc",
! 					    "NOTE_KIND (&%0)");
  	  if (t == symbol_union_tp)
  	    subfields->opt = create_option (subfields->opt, "desc",
  					    "CONSTANT_POOL_ADDRESS_P (&%0)");
Index: ddg.c
===================================================================
*** ddg.c	(revision 124446)
--- ddg.c	(working copy)
*************** create_ddg (basic_block bb, struct df *d
*** 488,494 ****
        if (! INSN_P (insn))
  	{
  	  if (! first_note && NOTE_P (insn)
! 	      && NOTE_LINE_NUMBER (insn) !=  NOTE_INSN_BASIC_BLOCK)
  	    first_note = insn;
  	  continue;
  	}
--- 488,494 ----
        if (! INSN_P (insn))
  	{
  	  if (! first_note && NOTE_P (insn)
! 	      && NOTE_KIND (insn) !=  NOTE_INSN_BASIC_BLOCK)
  	    first_note = insn;
  	  continue;
  	}
Index: final.c
===================================================================
*** final.c	(revision 124446)
--- final.c	(working copy)
*************** final (rtx first, FILE *file, int optimi
*** 1545,1577 ****
  
    last_ignored_compare = 0;
  
- #ifdef SDB_DEBUGGING_INFO
-   /* When producing SDB debugging info, delete troublesome line number
-      notes from inlined functions in other files as well as duplicate
-      line number notes.  */
-   if (write_symbols == SDB_DEBUG)
-     {
-       rtx last = 0;
-       for (insn = first; insn; insn = NEXT_INSN (insn))
- 	if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
- 	  {
- 	    if (last != 0
- #ifdef USE_MAPPED_LOCATION
- 		&& NOTE_SOURCE_LOCATION (insn) == NOTE_SOURCE_LOCATION (last)
- #else
- 		&& NOTE_LINE_NUMBER (insn) == NOTE_LINE_NUMBER (last)
- 		&& NOTE_SOURCE_FILE (insn) == NOTE_SOURCE_FILE (last)
- #endif
- 	      )
- 	      {
- 		delete_insn (insn);	/* Use delete_note.  */
- 		continue;
- 	      }
- 	    last = insn;
- 	  }
-     }
- #endif
- 
    for (insn = first; insn; insn = NEXT_INSN (insn))
      {
        if (INSN_UID (insn) > max_uid)       /* Find largest UID.  */
--- 1545,1550 ----
*************** final_scan_insn (rtx insn, FILE *file, i
*** 1695,1701 ****
    switch (GET_CODE (insn))
      {
      case NOTE:
!       switch (NOTE_LINE_NUMBER (insn))
  	{
  	case NOTE_INSN_DELETED:
  	  break;
--- 1668,1674 ----
    switch (GET_CODE (insn))
      {
      case NOTE:
!       switch (NOTE_KIND (insn))
  	{
  	case NOTE_INSN_DELETED:
  	  break;
*************** final_scan_insn (rtx insn, FILE *file, i
*** 1818,1828 ****
  	  (*debug_hooks->var_location) (insn);
  	  break;
  
- 	case 0:
- 	  break;
- 
  	default:
! 	  gcc_assert (NOTE_LINE_NUMBER (insn) > 0);
  	  break;
  	}
        break;
--- 1791,1798 ----
  	  (*debug_hooks->var_location) (insn);
  	  break;
  
  	default:
! 	  gcc_unreachable ();
  	  break;
  	}
        break;
*************** output_asm_label (rtx x)
*** 3235,3241 ****
      x = XEXP (x, 0);
    if (LABEL_P (x)
        || (NOTE_P (x)
! 	  && NOTE_LINE_NUMBER (x) == NOTE_INSN_DELETED_LABEL))
      ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
    else
      output_operand_lossage ("'%%l' operand isn't a label");
--- 3205,3211 ----
      x = XEXP (x, 0);
    if (LABEL_P (x)
        || (NOTE_P (x)
! 	  && NOTE_KIND (x) == NOTE_INSN_DELETED_LABEL))
      ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
    else
      output_operand_lossage ("'%%l' operand isn't a label");
Index: reorg.c
===================================================================
*** reorg.c	(revision 124446)
--- reorg.c	(working copy)
*************** dbr_schedule (rtx first)
*** 3807,3813 ****
        if (INSN_UID (insn) > max_uid)
  	max_uid = INSN_UID (insn);
        if (NOTE_P (insn)
! 	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EPILOGUE_BEG)
  	epilogue_insn = insn;
      }
  
--- 3807,3813 ----
        if (INSN_UID (insn) > max_uid)
  	max_uid = INSN_UID (insn);
        if (NOTE_P (insn)
! 	  && NOTE_KIND (insn) == NOTE_INSN_EPILOGUE_BEG)
  	epilogue_insn = insn;
      }
  
Index: haifa-sched.c
===================================================================
*** haifa-sched.c	(revision 124446)
--- haifa-sched.c	(working copy)
*************** unlink_other_notes (rtx insn, rtx tail)
*** 1305,1312 ****
          }
  
        /* See sched_analyze to see how these are handled.  */
!       if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG
! 	  && NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_END)
  	{
  	  /* Insert the note at the end of the notes list.  */
  	  PREV_INSN (insn) = note_list;
--- 1305,1312 ----
          }
  
        /* See sched_analyze to see how these are handled.  */
!       if (NOTE_KIND (insn) != NOTE_INSN_EH_REGION_BEG
! 	  && NOTE_KIND (insn) != NOTE_INSN_EH_REGION_END)
  	{
  	  /* Insert the note at the end of the notes list.  */
  	  PREV_INSN (insn) = note_list;
Index: mode-switching.c
===================================================================
*** mode-switching.c	(revision 124446)
--- mode-switching.c	(working copy)
*************** optimize_mode_switching (void)
*** 664,672 ****
  		  if (mode_set != NULL_RTX)
  		    {
  		      emited = true;
! 		      if (NOTE_P (ptr->insn_ptr)
! 			  && (NOTE_LINE_NUMBER (ptr->insn_ptr)
! 			      == NOTE_INSN_BASIC_BLOCK))
  			emit_insn_after (mode_set, ptr->insn_ptr);
  		      else
  			emit_insn_before (mode_set, ptr->insn_ptr);
--- 664,670 ----
  		  if (mode_set != NULL_RTX)
  		    {
  		      emited = true;
! 		      if (NOTE_INSN_BASIC_BLOCK_P (ptr->insn_ptr))
  			emit_insn_after (mode_set, ptr->insn_ptr);
  		      else
  			emit_insn_before (mode_set, ptr->insn_ptr);
Index: graph.c
===================================================================
*** graph.c	(revision 124446)
--- graph.c	(working copy)
*************** darkgrey\n  shape: ellipse" : "white",
*** 146,154 ****
    /* Print the RTL.  */
    if (NOTE_P (tmp_rtx))
      {
!       const char *name = "";
!       if (NOTE_LINE_NUMBER (tmp_rtx) < 0)
! 	name =  GET_NOTE_INSN_NAME (NOTE_LINE_NUMBER (tmp_rtx));
        fprintf (fp, " %s", name);
      }
    else if (INSN_P (tmp_rtx))
--- 146,153 ----
    /* Print the RTL.  */
    if (NOTE_P (tmp_rtx))
      {
!       const char *name;
!       name =  GET_NOTE_INSN_NAME (NOTE_KIND (tmp_rtx));
        fprintf (fp, " %s", name);
      }
    else if (INSN_P (tmp_rtx))
Index: rtl.def
===================================================================
*** rtl.def	(revision 124446)
--- rtl.def	(working copy)
*************** DEF_RTL_EXPR(BARRIER, "barrier", "iuu000
*** 137,156 ****
     7: is the user-given name of the label, if any.  */
  DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA)
  
- #ifdef USE_MAPPED_LOCATION
  /* Say where in the code a source line starts, for symbol table's sake.
     Operand:
!    4: unused if line number > 0, note-specific data otherwise.
!    5: line number if > 0, enum note_insn otherwise.
!    6: CODE_LABEL_NUMBER if line number == NOTE_INSN_DELETED_LABEL.  */
! #else
! /* Say where in the code a source line starts, for symbol table's sake.
!    Operand:
!    4: filename, if line number > 0, note-specific data otherwise.
!    5: line number if > 0, enum note_insn otherwise.
     6: unique number if line number == note_insn_deleted_label.  */
! #endif
! DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA)
  
  /* ----------------------------------------------------------------------
     Top level constituents of INSN, JUMP_INSN and CALL_INSN.
--- 137,148 ----
     7: is the user-given name of the label, if any.  */
  DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA)
  
  /* Say where in the code a source line starts, for symbol table's sake.
     Operand:
!    4: note-specific data
!    5: unused (memory layout has to match code_label above)
     6: unique number if line number == note_insn_deleted_label.  */
! DEF_RTL_EXPR(NOTE, "note", "iuuB00i", RTX_EXTRA)
  
  /* ----------------------------------------------------------------------
     Top level constituents of INSN, JUMP_INSN and CALL_INSN.
Index: jump.c
===================================================================
*** jump.c	(revision 124446)
--- jump.c	(working copy)
*************** mark_all_labels (rtx f)
*** 227,288 ****
      }
  }
  
- /* Move all block-beg, block-end and loop-beg notes between START and END out
-    before START.  START and END may be such notes.  Returns the values of the
-    new starting and ending insns, which may be different if the original ones
-    were such notes.  Return true if there were only such notes and no real
-    instructions.  */
- 
- bool
- squeeze_notes (rtx* startp, rtx* endp)
- {
-   rtx start = *startp;
-   rtx end = *endp;
- 
-   rtx insn;
-   rtx next;
-   rtx last = NULL;
-   rtx past_end = NEXT_INSN (end);
- 
-   for (insn = start; insn != past_end; insn = next)
-     {
-       next = NEXT_INSN (insn);
-       if (NOTE_P (insn)
- 	  && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END
- 	      || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG))
- 	{
- 	  /* BLOCK_BEG or BLOCK_END notes only exist in the `final' pass.  */
- 	  gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_BEG
- 		      && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BLOCK_END);
- 
- 	  if (insn == start)
- 	    start = next;
- 	  else
- 	    {
- 	      rtx prev = PREV_INSN (insn);
- 	      PREV_INSN (insn) = PREV_INSN (start);
- 	      NEXT_INSN (insn) = start;
- 	      NEXT_INSN (PREV_INSN (insn)) = insn;
- 	      PREV_INSN (NEXT_INSN (insn)) = insn;
- 	      NEXT_INSN (prev) = next;
- 	      PREV_INSN (next) = prev;
- 	    }
- 	}
-       else
- 	last = insn;
-     }
- 
-   /* There were no real instructions.  */
-   if (start == past_end)
-     return true;
- 
-   end = last;
- 
-   *startp = start;
-   *endp = end;
-   return false;
- }
- 
  /* Given a comparison (CODE ARG0 ARG1), inside an insn, INSN, return a code
     of reversed comparison if it is possible to do so.  Otherwise return UNKNOWN.
     UNKNOWN may be returned in case we are having CC_MODE compare and we don't
--- 227,232 ----
*************** mark_jump_label (rtx x, rtx insn, int in
*** 1014,1020 ****
  	/* Ignore remaining references to unreachable labels that
  	   have been deleted.  */
  	if (NOTE_P (label)
! 	    && NOTE_LINE_NUMBER (label) == NOTE_INSN_DELETED_LABEL)
  	  break;
  
  	gcc_assert (LABEL_P (label));
--- 958,964 ----
  	/* Ignore remaining references to unreachable labels that
  	   have been deleted.  */
  	if (NOTE_P (label)
! 	    && NOTE_KIND (label) == NOTE_INSN_DELETED_LABEL)
  	  break;
  
  	gcc_assert (LABEL_P (label));
Index: ifcvt.c
===================================================================
*** ifcvt.c	(revision 124446)
--- ifcvt.c	(working copy)
*************** dead_or_predicable (basic_block test_bb,
*** 3899,3907 ****
        if (end == BB_END (merge_bb))
  	BB_END (merge_bb) = PREV_INSN (head);
  
-       if (squeeze_notes (&head, &end))
- 	return TRUE;
- 
        /* PR 21767: When moving insns above a conditional branch, REG_EQUAL
  	 notes might become invalid.  */
        insn = head;
--- 3899,3904 ----
Index: dwarf2out.c
===================================================================
*** dwarf2out.c	(revision 124446)
--- dwarf2out.c	(working copy)
*************** gen_label_die (tree decl, dw_die_ref con
*** 12233,12239 ****
        if (insn
  	  && (LABEL_P (insn)
  	      || ((NOTE_P (insn)
! 	           && NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL))))
  	{
  	  /* When optimization is enabled (via -O) some parts of the compiler
  	     (e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which
--- 12233,12239 ----
        if (insn
  	  && (LABEL_P (insn)
  	      || ((NOTE_P (insn)
! 	           && NOTE_KIND (insn) == NOTE_INSN_DELETED_LABEL))))
  	{
  	  /* When optimization is enabled (via -O) some parts of the compiler
  	     (e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which
*************** dwarf2out_var_location (rtx loc_note)
*** 13849,13855 ****
    if (last_insn != NULL_RTX
        && last_insn == prev_insn
        && NOTE_P (prev_insn)
!       && NOTE_LINE_NUMBER (prev_insn) == NOTE_INSN_VAR_LOCATION)
      {
        newloc->label = last_label;
      }
--- 13849,13855 ----
    if (last_insn != NULL_RTX
        && last_insn == prev_insn
        && NOTE_P (prev_insn)
!       && NOTE_KIND (prev_insn) == NOTE_INSN_VAR_LOCATION)
      {
        newloc->label = last_label;
      }
Index: cfgbuild.c
===================================================================
*** cfgbuild.c	(revision 124446)
--- cfgbuild.c	(working copy)
*************** make_edges (basic_block min, basic_block
*** 402,408 ****
  
        while (insn
  	     && NOTE_P (insn)
! 	     && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)
  	insn = NEXT_INSN (insn);
  
        if (!insn)
--- 402,408 ----
  
        while (insn
  	     && NOTE_P (insn)
! 	     && NOTE_KIND (insn) != NOTE_INSN_BASIC_BLOCK)
  	insn = NEXT_INSN (insn);
  
        if (!insn)
*************** find_basic_blocks_1 (rtx f)
*** 469,490 ****
        switch (code)
  	{
  	case NOTE:
! 	  {
! 	    int kind = NOTE_LINE_NUMBER (insn);
! 
! 	    /* Look for basic block notes with which to keep the
! 	       basic_block_info pointers stable.  Unthread the note now;
! 	       we'll put it back at the right place in create_basic_block.
! 	       Or not at all if we've already found a note in this block.  */
! 	    if (kind == NOTE_INSN_BASIC_BLOCK)
! 	      {
! 		if (bb_note == NULL_RTX)
! 		  bb_note = insn;
! 		else
! 		  next = delete_insn (insn);
! 	      }
! 	    break;
! 	  }
  
  	case CODE_LABEL:
  	case JUMP_INSN:
--- 469,486 ----
        switch (code)
  	{
  	case NOTE:
! 	  /* Look for basic block notes with which to keep the
! 	     basic_block_info pointers stable.  Unthread the note now;
! 	     we'll put it back at the right place in create_basic_block.
! 	     Or not at all if we've already found a note in this block.  */
! 	  if (NOTE_INSN_BASIC_BLOCK_P (insn))
! 	    {
! 	      if (bb_note == NULL_RTX)
! 		bb_note = insn;
! 	      else
! 		next = delete_insn (insn);
! 	    }
! 	  break;
  
  	case CODE_LABEL:
  	case JUMP_INSN:
Index: function.c
===================================================================
*** function.c	(revision 124446)
--- function.c	(working copy)
*************** reorder_blocks_1 (rtx insns, tree curren
*** 3567,3573 ****
      {
        if (NOTE_P (insn))
  	{
! 	  if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG)
  	    {
  	      tree block = NOTE_BLOCK (insn);
  	      tree origin;
--- 3567,3573 ----
      {
        if (NOTE_P (insn))
  	{
! 	  if (NOTE_KIND (insn) == NOTE_INSN_BLOCK_BEG)
  	    {
  	      tree block = NOTE_BLOCK (insn);
  	      tree origin;
*************** reorder_blocks_1 (rtx insns, tree curren
*** 3608,3614 ****
  		}
  	      VEC_safe_push (tree, heap, *p_block_stack, block);
  	    }
! 	  else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
  	    {
  	      NOTE_BLOCK (insn) = VEC_pop (tree, *p_block_stack);
  	      BLOCK_SUBBLOCKS (current_block)
--- 3608,3614 ----
  		}
  	      VEC_safe_push (tree, heap, *p_block_stack, block);
  	    }
! 	  else if (NOTE_KIND (insn) == NOTE_INSN_BLOCK_END)
  	    {
  	      NOTE_BLOCK (insn) = VEC_pop (tree, *p_block_stack);
  	      BLOCK_SUBBLOCKS (current_block)
*************** epilogue_done:
*** 5237,5243 ****
  	{
  	  next = NEXT_INSN (insn);
  	  if (NOTE_P (insn) 
! 	      && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG))
  	    reorder_insns (insn, insn, PREV_INSN (epilogue_end));
  	}
      }
--- 5237,5243 ----
  	{
  	  next = NEXT_INSN (insn);
  	  if (NOTE_P (insn) 
! 	      && (NOTE_KIND (insn) == NOTE_INSN_FUNCTION_BEG))
  	    reorder_insns (insn, insn, PREV_INSN (epilogue_end));
  	}
      }
*************** reposition_prologue_and_epilogue_notes (
*** 5265,5271 ****
  	{
  	  if (NOTE_P (insn))
  	    {
! 	      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_PROLOGUE_END)
  		note = insn;
  	    }
  	  else if (contains (insn, &prologue))
--- 5265,5271 ----
  	{
  	  if (NOTE_P (insn))
  	    {
! 	      if (NOTE_KIND (insn) == NOTE_INSN_PROLOGUE_END)
  		note = insn;
  	    }
  	  else if (contains (insn, &prologue))
*************** reposition_prologue_and_epilogue_notes (
*** 5284,5290 ****
  	    {
  	      for (note = last; (note = NEXT_INSN (note));)
  		if (NOTE_P (note)
! 		    && NOTE_LINE_NUMBER (note) == NOTE_INSN_PROLOGUE_END)
  		  break;
  	    }
  
--- 5284,5290 ----
  	    {
  	      for (note = last; (note = NEXT_INSN (note));)
  		if (NOTE_P (note)
! 		    && NOTE_KIND (note) == NOTE_INSN_PROLOGUE_END)
  		  break;
  	    }
  
*************** reposition_prologue_and_epilogue_notes (
*** 5306,5312 ****
  	{
  	  if (NOTE_P (insn))
  	    {
! 	      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EPILOGUE_BEG)
  		note = insn;
  	    }
  	  else if (contains (insn, &epilogue))
--- 5306,5312 ----
  	{
  	  if (NOTE_P (insn))
  	    {
! 	      if (NOTE_KIND (insn) == NOTE_INSN_EPILOGUE_BEG)
  		note = insn;
  	    }
  	  else if (contains (insn, &epilogue))
*************** reposition_prologue_and_epilogue_notes (
*** 5325,5331 ****
  	    {
  	      for (note = insn; (note = PREV_INSN (note));)
  		if (NOTE_P (note)
! 		    && NOTE_LINE_NUMBER (note) == NOTE_INSN_EPILOGUE_BEG)
  		  break;
  	    }
  
--- 5325,5331 ----
  	    {
  	      for (note = insn; (note = PREV_INSN (note));)
  		if (NOTE_P (note)
! 		    && NOTE_KIND (note) == NOTE_INSN_EPILOGUE_BEG)
  		  break;
  	    }
  
Index: print-rtl.c
===================================================================
*** print-rtl.c	(revision 124446)
--- print-rtl.c	(working copy)
*************** print_rtx (rtx in_rtx)
*** 270,276 ****
  #endif
  	else if (i == 4 && NOTE_P (in_rtx))
  	  {
! 	    switch (NOTE_LINE_NUMBER (in_rtx))
  	      {
  	      case NOTE_INSN_EH_REGION_BEG:
  	      case NOTE_INSN_EH_REGION_END:
--- 270,276 ----
  #endif
  	else if (i == 4 && NOTE_P (in_rtx))
  	  {
! 	    switch (NOTE_KIND (in_rtx))
  	      {
  	      case NOTE_INSN_EH_REGION_BEG:
  	      case NOTE_INSN_EH_REGION_END:
*************** print_rtx (rtx in_rtx)
*** 330,351 ****
  		break;
  
  	      default:
! 		{
! 		  const char * const str = X0STR (in_rtx, i);
! 
! 		  if (NOTE_LINE_NUMBER (in_rtx) < 0)
! 		    ;
! 		  else if (str == 0)
! 		    fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
! 		  else
! 		    {
! 		      if (dump_for_graph)
! 		        fprintf (outfile, " (\\\"%s\\\")", str);
! 		      else
! 		        fprintf (outfile, " (\"%s\")", str);
! 		    }
! 		  break;
! 		}
  	      }
  	  }
  	break;
--- 330,336 ----
  		break;
  
  	      default:
! 		break;
  	      }
  	  }
  	break;
*************** print_rtx (rtx in_rtx)
*** 412,418 ****
  	  {
  	    /* This field is only used for NOTE_INSN_DELETED_LABEL, and
  	       other times often contains garbage from INSN->NOTE death.  */
! 	    if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_DELETED_LABEL)
  	      fprintf (outfile, " %d",  XINT (in_rtx, i));
  	  }
  	else
--- 397,403 ----
  	  {
  	    /* This field is only used for NOTE_INSN_DELETED_LABEL, and
  	       other times often contains garbage from INSN->NOTE death.  */
! 	    if (NOTE_KIND (in_rtx) == NOTE_INSN_DELETED_LABEL)
  	      fprintf (outfile, " %d",  XINT (in_rtx, i));
  	  }
  	else
*************** print_rtx (rtx in_rtx)
*** 476,486 ****
        /* Print NOTE_INSN names rather than integer codes.  */
  
        case 'n':
! 	if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
! 	    && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
! 	  fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
! 	else
! 	  fprintf (outfile, " %d", XINT (in_rtx, i));
  	sawclose = 0;
  	break;
  
--- 461,467 ----
        /* Print NOTE_INSN names rather than integer codes.  */
  
        case 'n':
! 	fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
  	sawclose = 0;
  	break;
  
*************** print_rtx (rtx in_rtx)
*** 493,499 ****
  	    if (GET_CODE (in_rtx) == LABEL_REF)
  	      {
  		if (subc == NOTE
! 		    && NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
  		  {
  		    if (flag_dump_unnumbered)
  		      fprintf (outfile, " [# deleted]");
--- 474,480 ----
  	    if (GET_CODE (in_rtx) == LABEL_REF)
  	      {
  		if (subc == NOTE
! 		    && NOTE_KIND (sub) == NOTE_INSN_DELETED_LABEL)
  		  {
  		    if (flag_dump_unnumbered)
  		      fprintf (outfile, " [# deleted]");
*************** print_rtl (FILE *outf, rtx rtx_first)
*** 744,751 ****
        case CODE_LABEL:
        case BARRIER:
  	for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
! 	  if (! flag_dump_unnumbered
! 	      || !NOTE_P (tmp_rtx) || NOTE_LINE_NUMBER (tmp_rtx) < 0)
  	    {
  	      fputs (print_rtx_head, outfile);
  	      print_rtx (tmp_rtx);
--- 725,731 ----
        case CODE_LABEL:
        case BARRIER:
  	for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
! 	  if (! flag_dump_unnumbered)
  	    {
  	      fputs (print_rtx_head, outfile);
  	      print_rtx (tmp_rtx);
*************** print_rtl_single (FILE *outf, rtx x)
*** 767,774 ****
  {
    outfile = outf;
    sawclose = 0;
!   if (! flag_dump_unnumbered
!       || !NOTE_P (x) || NOTE_LINE_NUMBER (x) < 0)
      {
        fputs (print_rtx_head, outfile);
        print_rtx (x);
--- 747,753 ----
  {
    outfile = outf;
    sawclose = 0;
!   if (! flag_dump_unnumbered)
      {
        fputs (print_rtx_head, outfile);
        print_rtx (x);
Index: gcse.c
===================================================================
*** gcse.c	(revision 124446)
--- gcse.c	(working copy)
*************** insert_insn_start_bb (rtx insn, basic_bl
*** 6159,6166 ****
    while (before != 0)
      {
        if (! LABEL_P (before)
! 	  && (! NOTE_P (before)
! 	      || NOTE_LINE_NUMBER (before) != NOTE_INSN_BASIC_BLOCK))
  	break;
        prev = before;
        if (prev == BB_END (bb))
--- 6159,6165 ----
    while (before != 0)
      {
        if (! LABEL_P (before)
! 	  && !NOTE_INSN_BASIC_BLOCK_P (before))
  	break;
        prev = before;
        if (prev == BB_END (bb))
Index: alias.c
===================================================================
*** alias.c	(revision 124446)
--- alias.c	(working copy)
*************** init_alias_analysis (void)
*** 2546,2552 ****
  		}
  	    }
  	  else if (NOTE_P (insn)
! 		   && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
  	    copying_arguments = false;
  	}
  
--- 2546,2552 ----
  		}
  	    }
  	  else if (NOTE_P (insn)
! 		   && NOTE_KIND (insn) == NOTE_INSN_FUNCTION_BEG)
  	    copying_arguments = false;
  	}
  
Index: calls.c
===================================================================
*** calls.c	(revision 124446)
--- calls.c	(working copy)
*************** fixup_tail_calls (void)
*** 3173,3179 ****
        /* There are never REG_EQUIV notes for the incoming arguments
  	 after the NOTE_INSN_FUNCTION_BEG note, so stop if we see it.  */
        if (NOTE_P (insn)
! 	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
  	break;
  
        note = find_reg_note (insn, REG_EQUIV, 0);
--- 3173,3179 ----
        /* There are never REG_EQUIV notes for the incoming arguments
  	 after the NOTE_INSN_FUNCTION_BEG note, so stop if we see it.  */
        if (NOTE_P (insn)
! 	  && NOTE_KIND (insn) == NOTE_INSN_FUNCTION_BEG)
  	break;
  
        note = find_reg_note (insn, REG_EQUIV, 0);
Index: except.c
===================================================================
*** except.c	(revision 124446)
--- except.c	(working copy)
*************** sjlj_emit_function_enter (rtx dispatch_l
*** 1898,1906 ****
    for (fn_begin = get_insns (); ; fn_begin = NEXT_INSN (fn_begin))
      if (NOTE_P (fn_begin))
        {
! 	if (NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG)
  	  break;
! 	else if (NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_BASIC_BLOCK)
  	  fn_begin_outside_block = false;
        }
  
--- 1898,1906 ----
    for (fn_begin = get_insns (); ; fn_begin = NEXT_INSN (fn_begin))
      if (NOTE_P (fn_begin))
        {
! 	if (NOTE_KIND (fn_begin) == NOTE_INSN_FUNCTION_BEG)
  	  break;
! 	else if (NOTE_INSN_BASIC_BLOCK_P (fn_begin))
  	  fn_begin_outside_block = false;
        }
  
Index: emit-rtl.c
===================================================================
*** emit-rtl.c	(revision 124446)
--- emit-rtl.c	(working copy)
*************** add_insn_after (rtx insn, rtx after)
*** 3464,3471 ****
        if (BB_END (bb) == after
  	  /* Avoid clobbering of structure when creating new BB.  */
  	  && !BARRIER_P (insn)
! 	  && (!NOTE_P (insn)
! 	      || NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK))
  	BB_END (bb) = insn;
      }
  
--- 3464,3470 ----
        if (BB_END (bb) == after
  	  /* Avoid clobbering of structure when creating new BB.  */
  	  && !BARRIER_P (insn)
! 	  && !NOTE_INSN_BASIC_BLOCK_P (insn))
  	BB_END (bb) = insn;
      }
  
*************** add_insn_before (rtx insn, rtx before)
*** 3530,3537 ****
        gcc_assert (BB_HEAD (bb) != insn
  		  /* Avoid clobbering of structure when creating new BB.  */
  		  || BARRIER_P (insn)
! 		  || (NOTE_P (insn)
! 		      && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK));
      }
  
    PREV_INSN (before) = insn;
--- 3529,3535 ----
        gcc_assert (BB_HEAD (bb) != insn
  		  /* Avoid clobbering of structure when creating new BB.  */
  		  || BARRIER_P (insn)
! 		  || NOTE_INSN_BASIC_BLOCK_P (insn));
      }
  
    PREV_INSN (before) = insn;
*************** emit_label_before (rtx label, rtx before
*** 3904,3917 ****
  /* Emit a note of subtype SUBTYPE before the insn BEFORE.  */
  
  rtx
! emit_note_before (int subtype, rtx before)
  {
    rtx note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
! #ifndef USE_MAPPED_LOCATION
!   NOTE_SOURCE_FILE (note) = 0;
! #endif
!   NOTE_LINE_NUMBER (note) = subtype;
    BLOCK_FOR_INSN (note) = NULL;
  
    add_insn_before (note, before);
--- 3902,3912 ----
  /* Emit a note of subtype SUBTYPE before the insn BEFORE.  */
  
  rtx
! emit_note_before (enum insn_note subtype, rtx before)
  {
    rtx note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
!   NOTE_KIND (note) = subtype;
    BLOCK_FOR_INSN (note) = NULL;
  
    add_insn_before (note, before);
*************** emit_label_after (rtx label, rtx after)
*** 4104,4117 ****
  /* Emit a note of subtype SUBTYPE after the insn AFTER.  */
  
  rtx
! emit_note_after (int subtype, rtx after)
  {
    rtx note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
! #ifndef USE_MAPPED_LOCATION
!   NOTE_SOURCE_FILE (note) = 0;
! #endif
!   NOTE_LINE_NUMBER (note) = subtype;
    BLOCK_FOR_INSN (note) = NULL;
    add_insn_after (note, after);
    return note;
--- 4099,4109 ----
  /* Emit a note of subtype SUBTYPE after the insn AFTER.  */
  
  rtx
! emit_note_after (enum insn_note subtype, rtx after)
  {
    rtx note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
!   NOTE_KIND (note) = subtype;
    BLOCK_FOR_INSN (note) = NULL;
    add_insn_after (note, after);
    return note;
*************** emit_note_copy (rtx orig)
*** 4471,4477 ****
    
    INSN_UID (note) = cur_insn_uid++;
    NOTE_DATA (note) = NOTE_DATA (orig);
!   NOTE_LINE_NUMBER (note) = NOTE_LINE_NUMBER (orig);
    BLOCK_FOR_INSN (note) = NULL;
    add_insn (note);
    
--- 4463,4469 ----
    
    INSN_UID (note) = cur_insn_uid++;
    NOTE_DATA (note) = NOTE_DATA (orig);
!   NOTE_KIND (note) = NOTE_KIND (orig);
    BLOCK_FOR_INSN (note) = NULL;
    add_insn (note);
    
*************** emit_note_copy (rtx orig)
*** 4482,4494 ****
     and add it to the end of the doubly-linked list.  */
  
  rtx
! emit_note (int note_no)
  {
    rtx note;
  
    note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
!   NOTE_LINE_NUMBER (note) = note_no;
    memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
    BLOCK_FOR_INSN (note) = NULL;
    add_insn (note);
--- 4474,4486 ----
     and add it to the end of the doubly-linked list.  */
  
  rtx
! emit_note (enum insn_note kind)
  {
    rtx note;
  
    note = rtx_alloc (NOTE);
    INSN_UID (note) = cur_insn_uid++;
!   NOTE_KIND (note) = kind;
    memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
    BLOCK_FOR_INSN (note) = NULL;
    add_insn (note);
Index: cfgcleanup.c
===================================================================
*** cfgcleanup.c	(revision 124446)
--- cfgcleanup.c	(working copy)
*************** static void
*** 623,629 ****
  merge_blocks_move_predecessor_nojumps (basic_block a, basic_block b)
  {
    rtx barrier;
-   bool only_notes;
  
    /* If we are partitioning hot/cold basic blocks, we don't want to
       mess up unconditional or indirect jumps that cross between hot
--- 623,628 ----
*************** merge_blocks_move_predecessor_nojumps (b
*** 642,657 ****
    gcc_assert (BARRIER_P (barrier));
    delete_insn (barrier);
  
-   /* Move block and loop notes out of the chain so that we do not
-      disturb their order.
- 
-      ??? A better solution would be to squeeze out all the non-nested notes
-      and adjust the block trees appropriately.   Even better would be to have
-      a tighter connection between block trees and rtl so that this is not
-      necessary.  */
-   only_notes = squeeze_notes (&BB_HEAD (a), &BB_END (a));
-   gcc_assert (!only_notes);
- 
    /* Scramble the insn chain.  */
    if (BB_END (a) != PREV_INSN (BB_HEAD (b)))
      reorder_insns_nobb (BB_HEAD (a), BB_END (a), PREV_INSN (BB_HEAD (b)));
--- 641,646 ----
*************** merge_blocks_move_successor_nojumps (bas
*** 679,685 ****
  {
    rtx barrier, real_b_end;
    rtx label, table;
-   bool only_notes;
  
    /* If we are partitioning hot/cold basic blocks, we don't want to
       mess up unconditional or indirect jumps that cross between hot
--- 668,673 ----
*************** merge_blocks_move_successor_nojumps (bas
*** 709,724 ****
    if (barrier && BARRIER_P (barrier))
      delete_insn (barrier);
  
-   /* Move block and loop notes out of the chain so that we do not
-      disturb their order.
- 
-      ??? A better solution would be to squeeze out all the non-nested notes
-      and adjust the block trees appropriately.   Even better would be to have
-      a tighter connection between block trees and rtl so that this is not
-      necessary.  */
-   only_notes = squeeze_notes (&BB_HEAD (b), &BB_END (b));
-   gcc_assert (!only_notes);
- 
  
    /* Scramble the insn chain.  */
    reorder_insns_nobb (BB_HEAD (b), BB_END (b), BB_END (a));
--- 697,702 ----
*************** try_optimize_cfg (int mode)
*** 2028,2034 ****
  		  delete_insn_chain (label, label);
  		  /* In the case label is undeletable, move it after the
  		     BASIC_BLOCK note.  */
! 		  if (NOTE_LINE_NUMBER (BB_HEAD (b)) == NOTE_INSN_DELETED_LABEL)
  		    {
  		      rtx bb_note = NEXT_INSN (BB_HEAD (b));
  
--- 2006,2012 ----
  		  delete_insn_chain (label, label);
  		  /* In the case label is undeletable, move it after the
  		     BASIC_BLOCK note.  */
! 		  if (NOTE_KIND (BB_HEAD (b)) == NOTE_INSN_DELETED_LABEL)
  		    {
  		      rtx bb_note = NEXT_INSN (BB_HEAD (b));
  
Index: cfglayout.c
===================================================================
*** cfglayout.c	(revision 124446)
--- cfglayout.c	(working copy)
*************** skip_insns_after_block (basic_block bb)
*** 98,112 ****
  	  continue;
  
  	case NOTE:
! 	  switch (NOTE_LINE_NUMBER (insn))
  	    {
  	    case NOTE_INSN_BLOCK_END:
! 	      last_insn = insn;
! 	      continue;
! 	    case NOTE_INSN_DELETED:
! 	    case NOTE_INSN_DELETED_LABEL:
  	      continue;
- 
  	    default:
  	      continue;
  	      break;
--- 98,108 ----
  	  continue;
  
  	case NOTE:
! 	  switch (NOTE_KIND (insn))
  	    {
  	    case NOTE_INSN_BLOCK_END:
! 	      gcc_unreachable ();
  	      continue;
  	    default:
  	      continue;
  	      break;
*************** skip_insns_after_block (basic_block bb)
*** 146,154 ****
      {
        prev = PREV_INSN (insn);
        if (NOTE_P (insn))
! 	switch (NOTE_LINE_NUMBER (insn))
  	  {
  	  case NOTE_INSN_BLOCK_END:
  	  case NOTE_INSN_DELETED:
  	  case NOTE_INSN_DELETED_LABEL:
  	    continue;
--- 142,152 ----
      {
        prev = PREV_INSN (insn);
        if (NOTE_P (insn))
! 	switch (NOTE_KIND (insn))
  	  {
  	  case NOTE_INSN_BLOCK_END:
+ 	    gcc_unreachable ();
+ 	    break;
  	  case NOTE_INSN_DELETED:
  	  case NOTE_INSN_DELETED_LABEL:
  	    continue;
*************** record_effective_endpoints (void)
*** 191,197 ****
    for (insn = get_insns ();
         insn
         && NOTE_P (insn)
!        && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK;
         insn = NEXT_INSN (insn))
      continue;
    /* No basic blocks at all?  */
--- 189,195 ----
    for (insn = get_insns ();
         insn
         && NOTE_P (insn)
!        && NOTE_KIND (insn) != NOTE_INSN_BASIC_BLOCK;
         insn = NEXT_INSN (insn))
      continue;
    /* No basic blocks at all?  */
*************** duplicate_insn_chain (rtx from, rtx to)
*** 1033,1039 ****
  	  break;
  
  	case NOTE:
! 	  switch (NOTE_LINE_NUMBER (insn))
  	    {
  	      /* In case prologue is empty and function contain label
  		 in first BB, we may want to copy the block.  */
--- 1031,1037 ----
  	  break;
  
  	case NOTE:
! 	  switch (NOTE_KIND (insn))
  	    {
  	      /* In case prologue is empty and function contain label
  		 in first BB, we may want to copy the block.  */
*************** duplicate_insn_chain (rtx from, rtx to)
*** 1059,1069 ****
  	    default:
  	      /* All other notes should have already been eliminated.
  	       */
! 	      gcc_assert (NOTE_LINE_NUMBER (insn) >= 0);
! 
! 	      /* It is possible that no_line_number is set and the note
! 		 won't be emitted.  */
! 	      emit_note_copy (insn);
  	    }
  	  break;
  	default:
--- 1057,1063 ----
  	    default:
  	      /* All other notes should have already been eliminated.
  	       */
! 	      gcc_unreachable ();
  	    }
  	  break;
  	default:
Index: varasm.c
===================================================================
*** varasm.c	(revision 124446)
--- varasm.c	(working copy)
*************** output_constant_pool_1 (struct constant_
*** 3695,3701 ****
        tmp = XEXP (x, 0);
        gcc_assert (!INSN_DELETED_P (tmp));
        gcc_assert (!NOTE_P (tmp)
! 		  || NOTE_LINE_NUMBER (tmp) != NOTE_INSN_DELETED);
        break;
  
      default:
--- 3695,3701 ----
        tmp = XEXP (x, 0);
        gcc_assert (!INSN_DELETED_P (tmp));
        gcc_assert (!NOTE_P (tmp)
! 		  || NOTE_KIND (tmp) != NOTE_INSN_DELETED);
        break;
  
      default:
Index: sched-deps.c
===================================================================
*** sched-deps.c	(revision 124446)
--- sched-deps.c	(working copy)
*************** sched_analyze (struct deps *deps, rtx he
*** 1937,1944 ****
        /* EH_REGION insn notes can not appear until well after we complete
  	 scheduling.  */
        if (NOTE_P (insn))
! 	gcc_assert (NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG
! 		    && NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_END);
  
        if (current_sched_info->use_cselib)
  	cselib_process_insn (insn);
--- 1937,1944 ----
        /* EH_REGION insn notes can not appear until well after we complete
  	 scheduling.  */
        if (NOTE_P (insn))
! 	gcc_assert (NOTE_KIND (insn) != NOTE_INSN_EH_REGION_BEG
! 		    && NOTE_KIND (insn) != NOTE_INSN_EH_REGION_END);
  
        if (current_sched_info->use_cselib)
  	cselib_process_insn (insn);
Index: rtl.c
===================================================================
*** rtl.c	(revision 124446)
--- rtl.c	(working copy)
*************** const unsigned char rtx_code_size[NUM_RT
*** 119,133 ****
  #undef DEF_RTL_EXPR
  };
  
- /* Make sure all NOTE_INSN_* values are negative.  */
- extern char NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS
- [NOTE_INSN_MAX < 0 ? 1 : -1];
- 
  /* Names for kinds of NOTEs and REG_NOTEs.  */
  
! const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS] =
  {
-   "",
  #define DEF_INSN_NOTE(NAME) #NAME,
  #include "insn-notes.def"
  #undef DEF_INSN_NOTE
--- 119,128 ----
  #undef DEF_RTL_EXPR
  };
  
  /* Names for kinds of NOTEs and REG_NOTEs.  */
  
! const char * const note_insn_name[NOTE_INSN_MAX] =
  {
  #define DEF_INSN_NOTE(NAME) #NAME,
  #include "insn-notes.def"
  #undef DEF_INSN_NOTE
Index: rtl.h
===================================================================
*** rtl.h	(revision 124446)
--- rtl.h	(working copy)
*************** extern const char * const reg_note_name[
*** 834,852 ****
  #define NOTE_DATA(INSN)	        RTL_CHECKC1 (INSN, 4, NOTE)
  #define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
  #ifdef USE_MAPPED_LOCATION
- #define NOTE_SOURCE_LOCATION(INSN) XCUINT (INSN, 5, NOTE)
- #define NOTE_EXPANDED_LOCATION(XLOC, INSN)	\
-   (XLOC) = expand_location (NOTE_SOURCE_LOCATION (INSN))
  #define SET_INSN_DELETED(INSN) \
!   (PUT_CODE (INSN, NOTE), NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
  #else
- #define NOTE_EXPANDED_LOCATION(XLOC, INSN)	\
-   ((XLOC).file = NOTE_SOURCE_FILE (INSN),	\
-    (XLOC).line = NOTE_LINE_NUMBER (INSN))
- #define NOTE_SOURCE_FILE(INSN)	XCSTR (INSN, 4, NOTE)
  #define SET_INSN_DELETED(INSN) \
!   (PUT_CODE (INSN, NOTE),  NOTE_SOURCE_FILE (INSN) = 0, \
!    NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
  #endif
  #define NOTE_BLOCK(INSN)	XCTREE (INSN, 4, NOTE)
  #define NOTE_EH_HANDLER(INSN)	XCINT (INSN, 4, NOTE)
--- 834,845 ----
  #define NOTE_DATA(INSN)	        RTL_CHECKC1 (INSN, 4, NOTE)
  #define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
  #ifdef USE_MAPPED_LOCATION
  #define SET_INSN_DELETED(INSN) \
!   (PUT_CODE (INSN, NOTE), NOTE_KIND (INSN) = NOTE_INSN_DELETED)
  #else
  #define SET_INSN_DELETED(INSN) \
!   (PUT_CODE (INSN, NOTE), \
!    NOTE_KIND (INSN) = NOTE_INSN_DELETED)
  #endif
  #define NOTE_BLOCK(INSN)	XCTREE (INSN, 4, NOTE)
  #define NOTE_EH_HANDLER(INSN)	XCINT (INSN, 4, NOTE)
*************** extern const char * const reg_note_name[
*** 855,866 ****
  
  /* In a NOTE that is a line number, this is the line number.
     Other kinds of NOTEs are identified by negative numbers here.  */
! #define NOTE_LINE_NUMBER(INSN) XCINT (INSN, 5, NOTE)
  
  /* Nonzero if INSN is a note marking the beginning of a basic block.  */
  #define NOTE_INSN_BASIC_BLOCK_P(INSN)			\
    (GET_CODE (INSN) == NOTE				\
!    && NOTE_LINE_NUMBER (INSN) == NOTE_INSN_BASIC_BLOCK)
  
  /* Variable declaration and the location of a variable.  */
  #define NOTE_VAR_LOCATION_DECL(INSN)	(XCTREE (XCEXP (INSN, 4, NOTE), \
--- 848,859 ----
  
  /* In a NOTE that is a line number, this is the line number.
     Other kinds of NOTEs are identified by negative numbers here.  */
! #define NOTE_KIND(INSN) XCINT (INSN, 5, NOTE)
  
  /* Nonzero if INSN is a note marking the beginning of a basic block.  */
  #define NOTE_INSN_BASIC_BLOCK_P(INSN)			\
    (GET_CODE (INSN) == NOTE				\
!    && NOTE_KIND (INSN) == NOTE_INSN_BASIC_BLOCK)
  
  /* Variable declaration and the location of a variable.  */
  #define NOTE_VAR_LOCATION_DECL(INSN)	(XCTREE (XCEXP (INSN, 4, NOTE), \
*************** extern const char * const reg_note_name[
*** 868,874 ****
  #define NOTE_VAR_LOCATION_LOC(INSN)	(XCEXP (XCEXP (INSN, 4, NOTE),  \
  						1, VAR_LOCATION))
  
! /* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes
     that are not line numbers.  These codes are all negative.
     
     Notice that we do not try to use zero here for any of
--- 861,867 ----
  #define NOTE_VAR_LOCATION_LOC(INSN)	(XCEXP (XCEXP (INSN, 4, NOTE),  \
  						1, VAR_LOCATION))
  
! /* Codes that appear in the NOTE_KIND field for kinds of notes
     that are not line numbers.  These codes are all negative.
     
     Notice that we do not try to use zero here for any of
*************** extern const char * const reg_note_name[
*** 879,887 ****
  
  enum insn_note
  {
-   /* Keep all of these numbers negative.  Adjust as needed.  */
-   NOTE_INSN_BIAS = -100,
- 
  #define DEF_INSN_NOTE(NAME) NAME,
  #include "insn-notes.def"
  #undef DEF_INSN_NOTE
--- 872,877 ----
*************** enum insn_note
*** 891,899 ****
  
  /* Names for NOTE insn's other than line numbers.  */
  
! extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
  #define GET_NOTE_INSN_NAME(NOTE_CODE) \
!   (note_insn_name[(NOTE_CODE) - (int) NOTE_INSN_BIAS])
  
  /* The name of a label, in case it corresponds to an explicit label
     in the input source code.  */
--- 881,889 ----
  
  /* Names for NOTE insn's other than line numbers.  */
  
! extern const char * const note_insn_name[NOTE_INSN_MAX];
  #define GET_NOTE_INSN_NAME(NOTE_CODE) \
!   (note_insn_name[(NOTE_CODE)])
  
  /* The name of a label, in case it corresponds to an explicit label
     in the input source code.  */
*************** extern rtx emit_call_insn_before_noloc (
*** 1542,1548 ****
  extern rtx emit_call_insn_before_setloc (rtx, rtx, int);
  extern rtx emit_barrier_before (rtx);
  extern rtx emit_label_before (rtx, rtx);
! extern rtx emit_note_before (int, rtx);
  extern rtx emit_insn_after (rtx, rtx);
  extern rtx emit_insn_after_noloc (rtx, rtx);
  extern rtx emit_insn_after_setloc (rtx, rtx, int);
--- 1532,1538 ----
  extern rtx emit_call_insn_before_setloc (rtx, rtx, int);
  extern rtx emit_barrier_before (rtx);
  extern rtx emit_label_before (rtx, rtx);
! extern rtx emit_note_before (enum insn_note, rtx);
  extern rtx emit_insn_after (rtx, rtx);
  extern rtx emit_insn_after_noloc (rtx, rtx);
  extern rtx emit_insn_after_setloc (rtx, rtx, int);
*************** extern rtx emit_call_insn_after_noloc (r
*** 1554,1566 ****
  extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
  extern rtx emit_barrier_after (rtx);
  extern rtx emit_label_after (rtx, rtx);
! extern rtx emit_note_after (int, rtx);
  extern rtx emit_insn (rtx);
  extern rtx emit_jump_insn (rtx);
  extern rtx emit_call_insn (rtx);
  extern rtx emit_label (rtx);
  extern rtx emit_barrier (void);
! extern rtx emit_note (int);
  extern rtx emit_note_copy (rtx);
  extern rtx make_insn_raw (rtx);
  extern rtx make_jump_insn_raw (rtx);
--- 1544,1556 ----
  extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
  extern rtx emit_barrier_after (rtx);
  extern rtx emit_label_after (rtx, rtx);
! extern rtx emit_note_after (enum insn_note, rtx);
  extern rtx emit_insn (rtx);
  extern rtx emit_jump_insn (rtx);
  extern rtx emit_call_insn (rtx);
  extern rtx emit_label (rtx);
  extern rtx emit_barrier (void);
! extern rtx emit_note (enum insn_note);
  extern rtx emit_note_copy (rtx);
  extern rtx make_insn_raw (rtx);
  extern rtx make_jump_insn_raw (rtx);
*************** extern void mark_jump_label (rtx, rtx, i
*** 1598,1604 ****
  extern unsigned int cleanup_barriers (void);
  
  /* In jump.c */
- extern bool squeeze_notes (rtx *, rtx *);
  extern rtx delete_related_insns (rtx);
  
  /* In recog.c  */
--- 1588,1593 ----
Index: sched-int.h
===================================================================
*** sched-int.h	(revision 124446)
--- sched-int.h	(working copy)
*************** enum SPEC_SCHED_FLAGS {
*** 745,751 ****
    PREFER_NON_CONTROL_SPEC = PREFER_NON_DATA_SPEC << 1
  };
  
! #define NOTE_NOT_BB_P(NOTE) (NOTE_P (NOTE) && (NOTE_LINE_NUMBER (NOTE)	\
  					       != NOTE_INSN_BASIC_BLOCK))
  
  extern FILE *sched_dump;
--- 745,751 ----
    PREFER_NON_CONTROL_SPEC = PREFER_NON_DATA_SPEC << 1
  };
  
! #define NOTE_NOT_BB_P(NOTE) (NOTE_P (NOTE) && (NOTE_KIND (NOTE)	\
  					       != NOTE_INSN_BASIC_BLOCK))
  
  extern FILE *sched_dump;
Index: resource.c
===================================================================
*** resource.c	(revision 124446)
--- resource.c	(working copy)
*************** mark_target_live_regs (rtx insns, rtx ta
*** 1099,1105 ****
  	     RTL chain when there are no epilogue insns.  Certain resources
  	     are implicitly required at that point.  */
  	  else if (NOTE_P (real_insn)
! 		   && NOTE_LINE_NUMBER (real_insn) == NOTE_INSN_EPILOGUE_BEG)
  	    IOR_HARD_REG_SET (current_live_regs, start_of_epilogue_needs.regs);
  	}
  
--- 1099,1105 ----
  	     RTL chain when there are no epilogue insns.  Certain resources
  	     are implicitly required at that point.  */
  	  else if (NOTE_P (real_insn)
! 		   && NOTE_KIND (real_insn) == NOTE_INSN_EPILOGUE_BEG)
  	    IOR_HARD_REG_SET (current_live_regs, start_of_epilogue_needs.regs);
  	}
  
Index: sched-rgn.c
===================================================================
*** sched-rgn.c	(revision 124446)
--- sched-rgn.c	(working copy)
*************** void debug_dependencies (rtx head, rtx t
*** 2598,2606 ****
  	  fprintf (sched_dump, ";;   %6d ", INSN_UID (insn));
  	  if (NOTE_P (insn))
  	    {
! 	      n = NOTE_LINE_NUMBER (insn);
! 	      if (n < 0)
! 		fprintf (sched_dump, "%s\n", GET_NOTE_INSN_NAME (n));
  	    }
  	  else
  	    fprintf (sched_dump, " {%s}\n", GET_RTX_NAME (GET_CODE (insn)));
--- 2598,2605 ----
  	  fprintf (sched_dump, ";;   %6d ", INSN_UID (insn));
  	  if (NOTE_P (insn))
  	    {
! 	      n = NOTE_KIND (insn);
! 	      fprintf (sched_dump, "%s\n", GET_NOTE_INSN_NAME (n));
  	    }
  	  else
  	    fprintf (sched_dump, " {%s}\n", GET_RTX_NAME (GET_CODE (insn)));
Index: sched-vis.c
===================================================================
*** sched-vis.c	(revision 124446)
--- sched-vis.c	(working copy)
*************** print_insn (char *buf, rtx x, int verbos
*** 674,689 ****
        sprintf (buf, "i%4d: barrier", INSN_UID (x));
        break;
      case NOTE:
!       if (NOTE_LINE_NUMBER (x) > 0)
! 	{
! 	  expanded_location xloc;
! 	  NOTE_EXPANDED_LOCATION (xloc, x);
! 	  sprintf (buf, " %4d note \"%s\" %d", INSN_UID (x),
! 		   xloc.file, xloc.line);
! 	}
!       else
! 	sprintf (buf, " %4d %s", INSN_UID (x),
! 		 GET_NOTE_INSN_NAME (NOTE_LINE_NUMBER (x)));
        break;
      default:
        sprintf (buf, "i%4d  <What %s?>", INSN_UID (x),
--- 674,681 ----
        sprintf (buf, "i%4d: barrier", INSN_UID (x));
        break;
      case NOTE:
!       sprintf (buf, " %4d %s", INSN_UID (x),
! 	       GET_NOTE_INSN_NAME (NOTE_KIND (x)));
        break;
      default:
        sprintf (buf, "i%4d  <What %s?>", INSN_UID (x),
Index: config/alpha/alpha.c
===================================================================
*** config/alpha/alpha.c	(revision 124446)
--- config/alpha/alpha.c	(working copy)
*************** alpha_handle_trap_shadows (void)
*** 8593,8599 ****
      {
        if (GET_CODE (i) == NOTE)
  	{
! 	  switch (NOTE_LINE_NUMBER (i))
  	    {
  	    case NOTE_INSN_EH_REGION_BEG:
  	      exception_nesting++;
--- 8593,8599 ----
      {
        if (GET_CODE (i) == NOTE)
  	{
! 	  switch (NOTE_KIND (i))
  	    {
  	    case NOTE_INSN_EH_REGION_BEG:
  	      exception_nesting++;
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 124446)
--- config/i386/i386.c	(working copy)
*************** ix86_output_function_epilogue (FILE *fil
*** 6252,6263 ****
      rtx insn = get_last_insn ();
      while (insn
  	   && NOTE_P (insn)
! 	   && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED_LABEL)
        insn = PREV_INSN (insn);
      if (insn
  	&& (LABEL_P (insn)
  	    || (NOTE_P (insn)
! 		&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL)))
        fputs ("\tnop\n", file);
    }
  #endif
--- 6252,6263 ----
      rtx insn = get_last_insn ();
      while (insn
  	   && NOTE_P (insn)
! 	   && NOTE_KIND (insn) != NOTE_INSN_DELETED_LABEL)
        insn = PREV_INSN (insn);
      if (insn
  	&& (LABEL_P (insn)
  	    || (NOTE_P (insn)
! 		&& NOTE_KIND (insn) == NOTE_INSN_DELETED_LABEL)))
        fputs ("\tnop\n", file);
    }
  #endif
Index: config/sh/sh.c
===================================================================
*** config/sh/sh.c	(revision 124446)
--- config/sh/sh.c	(working copy)
*************** static bool unspec_caller_rtx_p (rtx);
*** 242,250 ****
  static bool sh_cannot_copy_insn_p (rtx);
  static bool sh_rtx_costs (rtx, int, int, int *);
  static int sh_address_cost (rtx);
- #ifdef TARGET_ADJUST_UNROLL_MAX
- static int sh_adjust_unroll_max (struct loop *, int, int, int, int);
- #endif
  static int sh_pr_n_sets (void);
  static rtx sh_allocate_initial_value (rtx);
  static int shmedia_target_regs_stack_space (HARD_REG_SET *);
--- 242,247 ----
*************** static int hard_regs_intersect_p (HARD_R
*** 469,479 ****
  
  #endif /* SYMBIAN */
  
- #ifdef TARGET_ADJUST_UNROLL_MAX
- #undef TARGET_ADJUST_UNROLL_MAX
- #define TARGET_ADJUST_UNROLL_MAX sh_adjust_unroll_max
- #endif
- 
  #undef TARGET_SECONDARY_RELOAD
  #define TARGET_SECONDARY_RELOAD sh_secondary_reload
  
--- 466,471 ----
*************** split_branches (rtx first)
*** 5240,5248 ****
        {
  	/* Shorten_branches would split this instruction again,
  	   so transform it into a note.  */
! 	PUT_CODE (insn, NOTE);
! 	NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
! 	NOTE_SOURCE_FILE (insn) = 0;
        }
      else if (GET_CODE (insn) == JUMP_INSN
  	     /* Don't mess with ADDR_DIFF_VEC */
--- 5232,5238 ----
        {
  	/* Shorten_branches would split this instruction again,
  	   so transform it into a note.  */
! 	SET_INSN_DELETED (insn);
        }
      else if (GET_CODE (insn) == JUMP_INSN
  	     /* Don't mess with ADDR_DIFF_VEC */
*************** sh_optimize_target_register_callee_saved
*** 9432,9461 ****
      return 0;
    if (calc_live_regs (&dummy) >= 6 * 8)
      return 1;
- #if 0
-   /* This is a borderline case.  See if we got a nested loop, or a loop
-      with a call, or with more than 4 labels inside.  */
-   for (insn = get_insns(); insn; insn = NEXT_INSN (insn))
-     {
-       if (GET_CODE (insn) == NOTE
- 	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
- 	{
- 	  int labels = 0;
- 
- 	  do
- 	    {
- 	      insn = NEXT_INSN (insn);
- 	      if ((GET_CODE (insn) == NOTE
- 		   && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
- 		  || GET_CODE (insn) == CALL_INSN
- 		  || (GET_CODE (insn) == CODE_LABEL && ++labels > 4))
- 		return 1;
- 	    }
- 	  while (GET_CODE (insn) != NOTE
- 		 || NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_END);
- 	}
-     }
- #endif
    return 0;
  }
  
--- 9422,9427 ----
*************** lose:
*** 10692,10966 ****
    return 0;
  }
  
- #ifdef TARGET_ADJUST_UNROLL_MAX
- static int
- sh_adjust_unroll_max (struct loop * loop, int insn_count,
- 		      int max_unrolled_insns, int strength_reduce_p,
- 		      int unroll_type)
- {
- /* This doesn't work in 4.0 because the old unroller & loop.h  is gone.  */
-   if (TARGET_ADJUST_UNROLL && TARGET_SHMEDIA)
-     {
-       /* Throttle back loop unrolling so that the costs of using more
- 	 targets than the eight target register we have don't outweigh
- 	 the benefits of unrolling.  */
-       rtx insn;
-       int n_labels = 0, n_calls = 0, n_exit_dest = 0, n_inner_loops = -1;
-       int n_barriers = 0;
-       rtx dest;
-       int i;
-       rtx exit_dest[8];
-       int threshold;
-       int unroll_benefit = 0, mem_latency = 0;
-       int base_cost, best_cost, cost;
-       int factor, best_factor;
-       int n_dest;
-       unsigned max_iterations = 32767;
-       int n_iterations;
-       int need_precond = 0, precond = 0;
-       basic_block * bbs = get_loop_body (loop);
-       struct niter_desc *desc;
- 
-       /* Assume that all labels inside the loop are used from inside the
- 	 loop.  If the loop has multiple entry points, it is unlikely to
- 	 be unrolled anyways.
- 	 Also assume that all calls are to different functions.  That is
- 	 somewhat pessimistic, but if you have lots of calls, unrolling the
- 	 loop is not likely to gain you much in the first place.  */
-       i = loop->num_nodes - 1;
-       for (insn = BB_HEAD (bbs[i]); ; )
- 	{
- 	  if (GET_CODE (insn) == CODE_LABEL)
- 	    n_labels++;
- 	  else if (GET_CODE (insn) == CALL_INSN)
- 	    n_calls++;
- 	  else if (GET_CODE (insn) == NOTE
- 		   && NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
- 	    n_inner_loops++;
- 	  else if (GET_CODE (insn) == BARRIER)
- 	    n_barriers++;
- 	  if (insn != BB_END (bbs[i]))
- 	    insn = NEXT_INSN (insn);
- 	  else if (--i >= 0)
- 	    insn = BB_HEAD (bbs[i]);
- 	   else
- 	    break;
- 	}
-       free (bbs);
-       /* One label for the loop top is normal, and it won't be duplicated by
- 	 unrolling.  */
-       if (n_labels <= 1)
- 	return max_unrolled_insns;
-       if (n_inner_loops > 0)
- 	return 0;
-       for (dest = loop->exit_labels; dest && n_exit_dest < 8;
- 	   dest = LABEL_NEXTREF (dest))
- 	{
- 	  for (i = n_exit_dest - 1;
- 	       i >= 0 && XEXP (dest, 0) != XEXP (exit_dest[i], 0); i--);
- 	  if (i < 0)
- 	    exit_dest[n_exit_dest++] = dest;
- 	}
-       /* If the loop top and call and exit destinations are enough to fill up
- 	 the target registers, we're unlikely to do any more damage by
- 	 unrolling.  */
-       if (n_calls + n_exit_dest >= 7)
- 	return max_unrolled_insns;
- 
-       /* ??? In the new loop unroller, there is no longer any strength
-          reduction information available.  Thus, when it comes to unrolling,
-          we know the cost of everything, but we know the value of nothing.  */
- #if 0
-       if (strength_reduce_p
- 	  && (unroll_type == LPT_UNROLL_RUNTIME
- 	      || unroll_type == LPT_UNROLL_CONSTANT
- 	      || unroll_type == LPT_PEEL_COMPLETELY))
- 	{
- 	  struct loop_ivs *ivs = LOOP_IVS (loop);
- 	  struct iv_class *bl;
- 
- 	  /* We'll save one compare-and-branch in each loop body copy
- 	     but the last one.  */
- 	  unroll_benefit = 1;
- 	  /* Assess the benefit of removing biv & giv updates.  */
- 	  for (bl = ivs->list; bl; bl = bl->next)
- 	    {
- 	      rtx increment = biv_total_increment (bl);
- 	      struct induction *v;
- 
- 	      if (increment && GET_CODE (increment) == CONST_INT)
- 		{
- 		  unroll_benefit++;
- 		  for (v = bl->giv; v; v = v->next_iv)
- 		    {
- 		      if (! v->ignore && v->same == 0
- 			  && GET_CODE (v->mult_val) == CONST_INT)
- 			unroll_benefit++;
- 		      /* If this giv uses an array, try to determine
- 			 a maximum iteration count from the size of the
- 			 array.  This need not be correct all the time,
- 			 but should not be too far off the mark too often.  */
- 		      while (v->giv_type == DEST_ADDR)
- 			{
- 			  rtx mem = PATTERN (v->insn);
- 			  tree mem_expr, type, size_tree;
- 
- 			  if (GET_CODE (SET_SRC (mem)) == MEM)
- 			    mem = SET_SRC (mem);
- 			  else if (GET_CODE (SET_DEST (mem)) == MEM)
- 			    mem = SET_DEST (mem);
- 			  else
- 			    break;
- 			  mem_expr = MEM_EXPR (mem);
- 			  if (! mem_expr)
- 			    break;
- 			  type = TREE_TYPE (mem_expr);
- 			  if (TREE_CODE (type) != ARRAY_TYPE
- 			      || ! TYPE_SIZE (type) || ! TYPE_SIZE_UNIT (type))
- 			    break;
- 			  size_tree = fold_build2 (TRUNC_DIV_EXPR,
- 						   bitsizetype,
- 						   TYPE_SIZE (type),
- 						   TYPE_SIZE_UNIT (type));
- 			  if (TREE_CODE (size_tree) == INTEGER_CST
- 			      && ! TREE_INT_CST_HIGH (size_tree)
- 			      && TREE_INT_CST_LOW  (size_tree) < max_iterations)
- 			    max_iterations = TREE_INT_CST_LOW  (size_tree);
- 			  break;
- 			}
- 		    }
- 		}
- 	    }
- 	}
- #else /* 0 */
-       /* Assume there is at least some benefit.  */
-       unroll_benefit = 1;
- #endif /* 0 */
- 
-       desc = get_simple_loop_desc (loop);
-       n_iterations = desc->const_iter ? desc->niter : 0;
-       max_iterations
- 	= max_iterations < desc->niter_max ? max_iterations : desc->niter_max;
- 
-       if (! strength_reduce_p || ! n_iterations)
- 	need_precond = 1;
-       if (! n_iterations)
- 	{
- 	  n_iterations
- 	    = max_iterations < 3 ? max_iterations : max_iterations * 3 / 4;
- 	  if (! n_iterations)
- 	    return 0;
- 	}
- #if 0 /* ??? See above - missing induction variable information.  */
-       while (unroll_benefit > 1) /* no loop */
- 	{
- 	  /* We include the benefit of biv/ giv updates.  Check if some or
- 	     all of these updates are likely to fit into a scheduling
- 	     bubble of a load.
- 	     We check for the following case:
- 	     - All the insns leading to the first JUMP_INSN are in a strict
- 	       dependency chain.
- 	     - there is at least one memory reference in them.
- 
- 	     When we find such a pattern, we assume that we can hide as many
- 	     updates as the total of the load latency is, if we have an
- 	     unroll factor of at least two.  We might or might not also do
- 	     this without unrolling, so rather than considering this as an
- 	     extra unroll benefit, discount it in the unroll benefits of unroll
- 	     factors higher than two.  */
- 		
- 	  rtx set, last_set;
- 
- 	  insn = next_active_insn (loop->start);
- 	  last_set = single_set (insn);
- 	  if (! last_set)
- 	    break;
- 	  if (GET_CODE (SET_SRC (last_set)) == MEM)
- 	    mem_latency += 2;
- 	  for (insn = NEXT_INSN (insn); insn != end; insn = NEXT_INSN (insn))
- 	    {
- 	      if (! INSN_P (insn))
- 		continue;
- 	      if (GET_CODE (insn) == JUMP_INSN)
- 		break;
- 	      if (! reg_referenced_p (SET_DEST (last_set), PATTERN (insn)))
- 		{
- 		  /* Check if this is a to-be-reduced giv insn.  */
- 		  struct loop_ivs *ivs = LOOP_IVS (loop);
- 		  struct iv_class *bl;
- 		  struct induction *v;
- 		  for (bl = ivs->list; bl; bl = bl->next)
- 		    {
- 		      if (bl->biv->insn == insn)
- 			goto is_biv;
- 		      for (v = bl->giv; v; v = v->next_iv)
- 			if (v->insn == insn)
- 			  goto is_giv;
- 		    }
- 		  mem_latency--;
- 		is_biv:
- 		is_giv:
- 		  continue;
- 		}
- 	      set = single_set (insn);
- 	      if (! set)
- 		continue;
- 	      if (GET_CODE (SET_SRC (set)) == MEM)
- 		mem_latency += 2;
- 	      last_set = set;
- 	    }
- 	  if (mem_latency < 0)
- 	    mem_latency = 0;
- 	  else if (mem_latency > unroll_benefit - 1)
- 	    mem_latency = unroll_benefit - 1;
- 	  break;
- 	}
- #endif /* 0 */
-       if (n_labels + (unroll_benefit + n_labels * 8) / n_iterations
- 	  <= unroll_benefit)
- 	return max_unrolled_insns;
- 
-       n_dest = n_labels + n_calls + n_exit_dest;
-       base_cost = n_dest <= 8 ? 0 : n_dest - 7;
-       best_cost = 0;
-       best_factor = 1;
-       if (n_barriers * 2 > n_labels - 1)
- 	n_barriers = (n_labels - 1) / 2;
-       for (factor = 2; factor <= 8; factor++)
- 	{
- 	  /* Bump up preconditioning cost for each power of two.  */
- 	  if (! (factor & (factor-1)))
- 	    precond += 4;
- 	  /* When preconditioning, only powers of two will be considered.  */
- 	  else if (need_precond)
- 	    continue;
- 	  n_dest = ((unroll_type != LPT_PEEL_COMPLETELY)
- 		    + (n_labels - 1) * factor + n_calls + n_exit_dest
- 		    - (n_barriers * factor >> 1)
- 		    + need_precond);
- 	  cost
- 	    = ((n_dest <= 8 ? 0 : n_dest - 7)
- 	       - base_cost * factor
- 	       - ((factor > 2 ? unroll_benefit - mem_latency : unroll_benefit)
- 		  * (factor - (unroll_type != LPT_PEEL_COMPLETELY)))
- 	       + ((unroll_benefit + 1 + (n_labels - 1) * factor)
- 		  / n_iterations));
- 	  if (need_precond)
- 	    cost += (precond + unroll_benefit * factor / 2) / n_iterations;
- 	  if (cost < best_cost)
- 	    {
- 	      best_cost = cost;
- 	      best_factor = factor;
- 	    }
- 	}
-       threshold = best_factor * insn_count;
-       if (max_unrolled_insns > threshold)
- 	max_unrolled_insns = threshold;
-     }
-   return max_unrolled_insns;
- }
- #endif /* TARGET_ADJUST_UNROLL_MAX */
- 
  /* Replace any occurrence of FROM(n) in X with TO(n).  The function does
     not enter into CONST_DOUBLE for the replace.
  
--- 10658,10663 ----
Index: config/c4x/c4x.c
===================================================================
*** config/c4x/c4x.c	(revision 124446)
--- config/c4x/c4x.c	(working copy)
*************** c4x_reorg (void)
*** 2443,2453 ****
  	     with only the 'deleted' bit set.  Transform it into a note
  	     to avoid confusion of subsequent processing.  */
  	  if (INSN_DELETED_P (old))
! 	    {
! 	      PUT_CODE (old, NOTE);
! 	      NOTE_LINE_NUMBER (old) = NOTE_INSN_DELETED;
! 	      NOTE_SOURCE_FILE (old) = 0;
! 	    }
  	}
      }
  }
--- 2443,2449 ----
  	     with only the 'deleted' bit set.  Transform it into a note
  	     to avoid confusion of subsequent processing.  */
  	  if (INSN_DELETED_P (old))
! 	    SET_INSN_DELETED (old);
  	}
      }
  }
Index: config/m68hc11/m68hc11.c
===================================================================
*** config/m68hc11/m68hc11.c	(revision 124446)
--- config/m68hc11/m68hc11.c	(working copy)
*************** m68hc11_check_z_replacement (rtx insn, s
*** 4247,4255 ****
  		  info->must_restore_reg = 0;
  		  info->found_call = 1;
  		  info->can_use_d = 0;
! 		  PUT_CODE (insn, NOTE);
! 		  NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
! 		  NOTE_SOURCE_FILE (insn) = 0;
  		  info->last = NEXT_INSN (insn);
  		  return 0;
  		}
--- 4247,4253 ----
  		  info->must_restore_reg = 0;
  		  info->found_call = 1;
  		  info->can_use_d = 0;
! 		  SET_INSN_DELETED (insn);
  		  info->last = NEXT_INSN (insn);
  		  return 0;
  		}
*************** m68hc11_check_z_replacement (rtx insn, s
*** 4330,4338 ****
  		  info->must_restore_reg = 0;
  		  info->found_call = 1;
  		  info->can_use_d = 0;
! 		  PUT_CODE (insn, NOTE);
! 		  NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
! 		  NOTE_SOURCE_FILE (insn) = 0;
  		  info->last = NEXT_INSN (insn);
  		  return 0;
  		}
--- 4328,4334 ----
  		  info->must_restore_reg = 0;
  		  info->found_call = 1;
  		  info->can_use_d = 0;
! 		  SET_INSN_DELETED (insn);
  		  info->last = NEXT_INSN (insn);
  		  return 0;
  		}
*************** m68hc11_reorg (void)
*** 5098,5106 ****
  	if (GET_CODE (body) == SET
  	    && rtx_equal_p (SET_SRC (body), SET_DEST (body)))
  	  {
! 	    PUT_CODE (insn, NOTE);
! 	    NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
! 	    NOTE_SOURCE_FILE (insn) = 0;
  	    continue;
  	  }
        }
--- 5094,5100 ----
  	if (GET_CODE (body) == SET
  	    && rtx_equal_p (SET_SRC (body), SET_DEST (body)))
  	  {
! 	    SET_INSN_DELETED  (insn);
  	    continue;
  	  }
        }
Index: config/ia64/ia64.c
===================================================================
*** config/ia64/ia64.c	(revision 124446)
--- config/ia64/ia64.c	(working copy)
*************** emit_insn_group_barriers (FILE *dump)
*** 5960,5966 ****
  	  insns_since_last_label = 0;
  	}
        else if (GET_CODE (insn) == NOTE
! 	       && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
  	  if (insns_since_last_label)
  	    last_label = insn;
--- 5960,5966 ----
  	  insns_since_last_label = 0;
  	}
        else if (GET_CODE (insn) == NOTE
! 	       && NOTE_KIND (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
  	  if (insns_since_last_label)
  	    last_label = insn;
*************** emit_predicate_relation_info (void)
*** 8332,8339 ****
        /* We only need such notes at code labels.  */
        if (GET_CODE (head) != CODE_LABEL)
  	continue;
!       if (GET_CODE (NEXT_INSN (head)) == NOTE
! 	  && NOTE_LINE_NUMBER (NEXT_INSN (head)) == NOTE_INSN_BASIC_BLOCK)
  	head = NEXT_INSN (head);
  
        /* Skip p0, which may be thought to be live due to (reg:DI p0)
--- 8332,8338 ----
        /* We only need such notes at code labels.  */
        if (GET_CODE (head) != CODE_LABEL)
  	continue;
!       if (NOTE_INSN_BASIC_BLOCK_P (NEXT_INSN (head)) == NOTE_INSN_BASIC_BLOCK)
  	head = NEXT_INSN (head);
  
        /* Skip p0, which may be thought to be live due to (reg:DI p0)
*************** process_for_unwind_directive (FILE *asm_
*** 8969,8976 ****
      {
        rtx pat;
  
!       if (GET_CODE (insn) == NOTE
! 	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
  	  last_block = NOTE_BASIC_BLOCK (insn)->next_bb == EXIT_BLOCK_PTR;
  
--- 8968,8974 ----
      {
        rtx pat;
  
!       if (NOTE_INSN_BASIC_BLOCK_P (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
  	  last_block = NOTE_BASIC_BLOCK (insn)->next_bb == EXIT_BLOCK_PTR;
  
Index: config/rs6000/rs6000.c
===================================================================
*** config/rs6000/rs6000.c	(revision 124446)
--- config/rs6000/rs6000.c	(working copy)
*************** rs6000_output_function_epilogue (FILE *f
*** 15752,15763 ****
      rtx insn = get_last_insn ();
      while (insn
  	   && NOTE_P (insn)
! 	   && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED_LABEL)
        insn = PREV_INSN (insn);
      if (insn
  	&& (LABEL_P (insn)
  	    || (NOTE_P (insn)
! 		&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL)))
        fputs ("\tnop\n", file);
    }
  #endif
--- 15752,15763 ----
      rtx insn = get_last_insn ();
      while (insn
  	   && NOTE_P (insn)
! 	   && NOTE_KIND (insn) != NOTE_INSN_DELETED_LABEL)
        insn = PREV_INSN (insn);
      if (insn
  	&& (LABEL_P (insn)
  	    || (NOTE_P (insn)
! 		&& NOTE_KIND (insn) == NOTE_INSN_DELETED_LABEL)))
        fputs ("\tnop\n", file);
    }
  #endif
*************** output_call (rtx insn, rtx *operands, in
*** 19204,19220 ****
  
        if (no_previous_def (funname))
  	{
- 	  int line_number = 0;
  	  rtx label_rtx = gen_label_rtx ();
  	  char *label_buf, temp_buf[256];
  	  ASM_GENERATE_INTERNAL_LABEL (temp_buf, "L",
  				       CODE_LABEL_NUMBER (label_rtx));
  	  label_buf = temp_buf[0] == '*' ? temp_buf + 1 : temp_buf;
  	  labelname = get_identifier (label_buf);
! 	  for (; insn && GET_CODE (insn) != NOTE; insn = PREV_INSN (insn));
! 	  if (insn)
! 	    line_number = NOTE_LINE_NUMBER (insn);
! 	  add_compiler_branch_island (labelname, funname, line_number);
  	}
        else
  	labelname = get_prev_label (funname);
--- 19204,19216 ----
  
        if (no_previous_def (funname))
  	{
  	  rtx label_rtx = gen_label_rtx ();
  	  char *label_buf, temp_buf[256];
  	  ASM_GENERATE_INTERNAL_LABEL (temp_buf, "L",
  				       CODE_LABEL_NUMBER (label_rtx));
  	  label_buf = temp_buf[0] == '*' ? temp_buf + 1 : temp_buf;
  	  labelname = get_identifier (label_buf);
! 	  add_compiler_branch_island (labelname, funname, insn_line (insn));
  	}
        else
  	labelname = get_prev_label (funname);
Index: config/pa/pa.c
===================================================================
*** config/pa/pa.c	(revision 124446)
--- config/pa/pa.c	(working copy)
*************** output_lbranch (rtx dest, rtx insn, int 
*** 6192,6200 ****
  		       optimize, 0, NULL);
  
        /* Now delete the delay insn.  */
!       PUT_CODE (NEXT_INSN (insn), NOTE);
!       NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED;
!       NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0;
      }
  
    /* Output an insn to save %r1.  The runtime documentation doesn't
--- 6192,6198 ----
  		       optimize, 0, NULL);
  
        /* Now delete the delay insn.  */
!       SET_INSN_DELETED (NEXT_INSN (insn));
      }
  
    /* Output an insn to save %r1.  The runtime documentation doesn't
*************** output_millicode_call (rtx insn, rtx cal
*** 7210,7218 ****
      output_asm_insn ("nop\n\tb,n %0", xoperands);
  
    /* Delete the jump.  */
!   PUT_CODE (NEXT_INSN (insn), NOTE);
!   NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED;
!   NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0;
  
    return "";
  }
--- 7208,7214 ----
      output_asm_insn ("nop\n\tb,n %0", xoperands);
  
    /* Delete the jump.  */
!   SET_INSN_DELETED (NEXT_INSN (insn));
  
    return "";
  }
*************** output_call (rtx insn, rtx call_dest, in
*** 7355,7363 ****
  			       optimize, 0, NULL);
  
  	      /* Now delete the delay insn.  */
! 	      PUT_CODE (NEXT_INSN (insn), NOTE);
! 	      NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED;
! 	      NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0;
  	      delay_insn_deleted = 1;
  	    }
  
--- 7351,7357 ----
  			       optimize, 0, NULL);
  
  	      /* Now delete the delay insn.  */
! 	      SET_INSN_DELETED (NEXT_INSN (insn));
  	      delay_insn_deleted = 1;
  	    }
  
*************** output_call (rtx insn, rtx call_dest, in
*** 7405,7413 ****
  			       NULL);
  
  	      /* Now delete the delay insn.  */
! 	      PUT_CODE (NEXT_INSN (insn), NOTE);
! 	      NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED;
! 	      NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0;
  	      delay_insn_deleted = 1;
  	    }
  
--- 7399,7405 ----
  			       NULL);
  
  	      /* Now delete the delay insn.  */
! 	      SET_INSN_DELETED (NEXT_INSN (insn));
  	      delay_insn_deleted = 1;
  	    }
  
*************** output_call (rtx insn, rtx call_dest, in
*** 7592,7600 ****
      output_asm_insn ("b,n %0", xoperands);
  
    /* Delete the jump.  */
!   PUT_CODE (NEXT_INSN (insn), NOTE);
!   NOTE_LINE_NUMBER (NEXT_INSN (insn)) = NOTE_INSN_DELETED;
!   NOTE_SOURCE_FILE (NEXT_INSN (insn)) = 0;
  
    return "";
  }
--- 7584,7590 ----
      output_asm_insn ("b,n %0", xoperands);
  
    /* Delete the jump.  */
!   SET_INSN_DELETED (NEXT_INSN (insn));
  
    return "";
  }
*************** pa_combine_instructions (void)
*** 8845,8853 ****
  					    PATTERN (floater))),
  				anchor);
  
! 	      PUT_CODE (anchor, NOTE);
! 	      NOTE_LINE_NUMBER (anchor) = NOTE_INSN_DELETED;
! 	      NOTE_SOURCE_FILE (anchor) = 0;
  
  	      /* Emit a special USE insn for FLOATER, then delete
  		 the floating insn.  */
--- 8835,8841 ----
  					    PATTERN (floater))),
  				anchor);
  
! 	      SET_INSN_DELETED (anchor);
  
  	      /* Emit a special USE insn for FLOATER, then delete
  		 the floating insn.  */
*************** pa_combine_instructions (void)
*** 8869,8877 ****
  					 anchor);
  
  	      JUMP_LABEL (temp) = JUMP_LABEL (anchor);
! 	      PUT_CODE (anchor, NOTE);
! 	      NOTE_LINE_NUMBER (anchor) = NOTE_INSN_DELETED;
! 	      NOTE_SOURCE_FILE (anchor) = 0;
  
  	      /* Emit a special USE insn for FLOATER, then delete
  		 the floating insn.  */
--- 8857,8863 ----
  					 anchor);
  
  	      JUMP_LABEL (temp) = JUMP_LABEL (anchor);
! 	      SET_INSN_DELETED (anchor);
  
  	      /* Emit a special USE insn for FLOATER, then delete
  		 the floating insn.  */
Index: config/mips/mips.c
===================================================================
*** config/mips/mips.c	(revision 124446)
--- config/mips/mips.c	(working copy)
*************** mips16_gp_pseudo_reg (void)
*** 7913,7919 ****
           note, so that it will be integrated.  */
        for (scan = get_insns (); scan != NULL_RTX; scan = NEXT_INSN (scan))
  	if (NOTE_P (scan)
! 	    && NOTE_LINE_NUMBER (scan) == NOTE_INSN_FUNCTION_BEG)
  	  break;
        if (scan == NULL_RTX)
  	scan = get_insns ();
--- 7913,7919 ----
           note, so that it will be integrated.  */
        for (scan = get_insns (); scan != NULL_RTX; scan = NEXT_INSN (scan))
  	if (NOTE_P (scan)
! 	    && NOTE_KIND (scan) == NOTE_INSN_FUNCTION_BEG)
  	  break;
        if (scan == NULL_RTX)
  	scan = get_insns ();
Index: config/bfin/bfin.c
===================================================================
*** config/bfin/bfin.c	(revision 124446)
--- config/bfin/bfin.c	(working copy)
*************** gen_one_bundle (rtx slot[3])
*** 4042,4048 ****
        while (t != slot[1])
  	{
  	  if (GET_CODE (t) != NOTE
! 	      || NOTE_LINE_NUMBER (t) != NOTE_INSN_DELETED)
  	    return false;
  	  t = NEXT_INSN (t);
  	}
--- 4042,4048 ----
        while (t != slot[1])
  	{
  	  if (GET_CODE (t) != NOTE
! 	      || NOTE_KIND (t) != NOTE_INSN_DELETED)
  	    return false;
  	  t = NEXT_INSN (t);
  	}
*************** gen_one_bundle (rtx slot[3])
*** 4053,4059 ****
        while (t != slot[2])
  	{
  	  if (GET_CODE (t) != NOTE
! 	      || NOTE_LINE_NUMBER (t) != NOTE_INSN_DELETED)
  	    return false;
  	  t = NEXT_INSN (t);
  	}
--- 4053,4059 ----
        while (t != slot[2])
  	{
  	  if (GET_CODE (t) != NOTE
! 	      || NOTE_KIND (t) != NOTE_INSN_DELETED)
  	    return false;
  	  t = NEXT_INSN (t);
  	}
Index: cfgrtl.c
===================================================================
*** cfgrtl.c	(revision 124446)
--- cfgrtl.c	(working copy)
*************** static void rtl_make_forwarder_block (ed
*** 85,92 ****
  static int
  can_delete_note_p (rtx note)
  {
!   return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED
! 	  || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK);
  }
  
  /* True if a given label can be deleted.  */
--- 85,92 ----
  static int
  can_delete_note_p (rtx note)
  {
!   return (NOTE_KIND (note) == NOTE_INSN_DELETED
! 	  || NOTE_KIND (note) == NOTE_INSN_BASIC_BLOCK);
  }
  
  /* True if a given label can be deleted.  */
*************** delete_insn (rtx insn)
*** 120,126 ****
  
  	  really_delete = false;
  	  PUT_CODE (insn, NOTE);
! 	  NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED_LABEL;
  	  NOTE_DELETED_LABEL_NAME (insn) = name;
  	}
  
--- 120,126 ----
  
  	  really_delete = false;
  	  PUT_CODE (insn, NOTE);
! 	  NOTE_KIND (insn) = NOTE_INSN_DELETED_LABEL;
  	  NOTE_DELETED_LABEL_NAME (insn) = name;
  	}
  
*************** rtl_merge_blocks (basic_block a, basic_b
*** 580,586 ****
  
        for (prev = PREV_INSN (a_end); ; prev = PREV_INSN (prev))
  	if (!NOTE_P (prev)
! 	    || NOTE_LINE_NUMBER (prev) == NOTE_INSN_BASIC_BLOCK
  	    || prev == BB_HEAD (a))
  	  break;
  
--- 580,586 ----
  
        for (prev = PREV_INSN (a_end); ; prev = PREV_INSN (prev))
  	if (!NOTE_P (prev)
! 	    || NOTE_INSN_BASIC_BLOCK_P (prev)
  	    || prev == BB_HEAD (a))
  	  break;
  
*************** commit_one_edge_insertion (edge e)
*** 1408,1415 ****
  	      bb_note = NULL_RTX;
  	      for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb));
  		   cur_insn = NEXT_INSN (cur_insn))
! 		if (NOTE_P (cur_insn)
! 		    && NOTE_LINE_NUMBER (cur_insn) == NOTE_INSN_BASIC_BLOCK)
  		  {
  		    bb_note = cur_insn;
  		    break;
--- 1408,1414 ----
  	      bb_note = NULL_RTX;
  	      for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb));
  		   cur_insn = NEXT_INSN (cur_insn))
! 		if (NOTE_INSN_BASIC_BLOCK_P (cur_insn))
  		  {
  		    bb_note = cur_insn;
  		    break;
*************** rtl_verify_flow_info (void)
*** 1969,1976 ****
  	  for (insn = BB_END (bb); !insn || !BARRIER_P (insn);
  	       insn = NEXT_INSN (insn))
  	    if (!insn
! 		|| (NOTE_P (insn)
! 		    && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK))
  		{
  		  error ("missing barrier after block %i", bb->index);
  		  err = 1;
--- 1968,1974 ----
  	  for (insn = BB_END (bb); !insn || !BARRIER_P (insn);
  	       insn = NEXT_INSN (insn))
  	    if (!insn
! 		|| NOTE_INSN_BASIC_BLOCK_P (insn))
  		{
  		  error ("missing barrier after block %i", bb->index);
  		  err = 1;
Index: stmt.c
===================================================================
*** stmt.c	(revision 124446)
--- stmt.c	(working copy)
*************** expand_case (tree exp)
*** 2317,2323 ****
    rtx table_label;
    int ncases;
    rtx *labelvec;
!   int i, fail;
    rtx before_case, end, lab;
  
    tree vec = SWITCH_LABELS (exp);
--- 2317,2323 ----
    rtx table_label;
    int ncases;
    rtx *labelvec;
!   int i;
    rtx before_case, end, lab;
  
    tree vec = SWITCH_LABELS (exp);
*************** expand_case (tree exp)
*** 2591,2598 ****
  
        before_case = NEXT_INSN (before_case);
        end = get_last_insn ();
-       fail = squeeze_notes (&before_case, &end);
-       gcc_assert (!fail);
        reorder_insns (before_case, end, start);
      }
  
--- 2591,2596 ----


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