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]

More (re)asserting


Hi,
this patch rewords a load of comments so that 'abort' doesn't show up
as often in greps.  It also replaces some aborts which appear to have
crept back in. In general, I've changed comments of the form
  If X is not true, we abort
to
  X must be true.
I.e. specify what the invariant _is_, not how we treat its violation.

booted & tested on i686-pc-linux-gnu, both checked & unchecked, installed.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>

	* alias.c (true_dependence): Remove 'abort' from comments. Use
	gcc_assert and gcc_unreachable as appropriate.
	(canon_true_dependence): Likewise.
	* bb-reorder.c (connect_traces): Likewise.
	* c-common.c (c_add_case_label): Likewise.
	* c-decl.c (finish_function): Likewise.
	* caller-save.c (insert_restore, insert_save): Likewise.
	* cfg.c (update_bb_profile_for_threading): Likewise.
	* cfganal.c (flow_active_insn_p): Likewise.
	* cfgexpand.c (add_reg_br_prob_note): Likewise.
	* cfgrtl.c (rtl_redirect_edge_and_branch_force, rtl_split_edge,
	cfg_layout_merge_blocks): Likewise.
	* ifcvt.c (cond_exec_process_insns, merge_if_block,
	find_if_block): Likewise.
	* integrate.c (allocate_initial_values): Likewise.
	* jump.c (reverse_condition, reverse_condition_maybe_unordered,
	swap_condition, unsigned_condition, signed_condition,
	mark_jump_label, invert_jump_1, rtx_renumbered_equal_p,
	reg_or_subregno): Likewise.
	* lambda-code.c (lambda_compute_auxillary_space,
	lambda_transform_legal_p): Likewise.
	* lambda-mat.c (lambda_matrix_inverse_hard): Likewise.
	* langhooks.c (lhd_set_decl_assembler_name, lhd_type_promotes_to,
	lhd_incomplete_type_error, lhd_expand_expr,
	lhd_types_compatible_p, lhd_tree_size): Likewise.
	* lcm.c (create_pre_exit, optimize_mode_switching): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.
	* loop-unroll.c (peel_loop_completely
	unroll_loop_constant_iterations, unroll_loop_runtime_iterations,
	peel_loop_simple, unroll_loop_stupid,
	analyze_iv_to_split_insn): Likewise.
	* loop.c (gen_prefetch, find_and_verify_loops,
	basic_induction_var): Likewise.
	* modulo-sched.c (normalize_sched_times, check_nodes_order): Likewise.
	* value-prof.c (tree_find_values_to_profile): Likewise.
	* varasm.c (named_section, default_assemble_integer,
	decode_addr_const): Likewise.

Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.249
diff -c -3 -p -r1.249 alias.c
*** alias.c	23 Jan 2005 15:05:27 -0000	1.249
--- alias.c	21 Apr 2005 13:57:17 -0000
*************** true_dependence (rtx mem, enum machine_m
*** 2141,2147 ****
  
    /* Read-only memory is by definition never modified, and therefore can't
       conflict with anything.  We don't expect to find read-only set on MEM,
!      but stupid user tricks can produce them, so don't abort.  */
    if (MEM_READONLY_P (x))
      return 0;
  
--- 2141,2147 ----
  
    /* Read-only memory is by definition never modified, and therefore can't
       conflict with anything.  We don't expect to find read-only set on MEM,
!      but stupid user tricks can produce them, so don't die.  */
    if (MEM_READONLY_P (x))
      return 0;
  
*************** canon_true_dependence (rtx mem, enum mac
*** 2214,2220 ****
  
    /* Read-only memory is by definition never modified, and therefore can't
       conflict with anything.  We don't expect to find read-only set on MEM,
!      but stupid user tricks can produce them, so don't abort.  */
    if (MEM_READONLY_P (x))
      return 0;
  
--- 2214,2220 ----
  
    /* Read-only memory is by definition never modified, and therefore can't
       conflict with anything.  We don't expect to find read-only set on MEM,
!      but stupid user tricks can produce them, so don't die.  */
    if (MEM_READONLY_P (x))
      return 0;
  
Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.100
diff -c -3 -p -r1.100 bb-reorder.c
*** bb-reorder.c	12 Apr 2005 20:39:01 -0000	1.100
--- bb-reorder.c	21 Apr 2005 13:57:21 -0000
*************** connect_traces (int n_traces, struct tra
*** 926,943 ****
  
        if (i >= n_traces)
  	{
! 	  if (two_passes && current_pass == 1)
! 	    {
! 	      i = 0;
! 	      t = i;
! 	      current_pass = 2;
! 	      if (current_partition == BB_HOT_PARTITION)
! 		current_partition = BB_COLD_PARTITION;
! 	      else
! 		current_partition = BB_HOT_PARTITION;
! 	    }
  	  else
! 	    abort ();
  	}
        
        if (connected[t])
--- 926,939 ----
  
        if (i >= n_traces)
  	{
! 	  gcc_assert (two_passes && current_pass == 1);
! 	  i = 0;
! 	  t = i;
! 	  current_pass = 2;
! 	  if (current_partition == BB_HOT_PARTITION)
! 	    current_partition = BB_COLD_PARTITION;
  	  else
! 	    current_partition = BB_HOT_PARTITION;
  	}
        
        if (connected[t])
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.623
diff -c -3 -p -r1.623 c-common.c
*** c-common.c	17 Apr 2005 21:27:45 -0000	1.623
--- c-common.c	21 Apr 2005 13:57:33 -0000
*************** c_add_case_label (splay_tree cases, tree
*** 3635,3641 ****
   error_out:
    /* Add a label so that the back-end doesn't think that the beginning of
       the switch is unreachable.  Note that we do not add a case label, as
!      that just leads to duplicates and thence to aborts later on.  */
    if (!cases->root)
      {
        tree t = create_artificial_label ();
--- 3635,3641 ----
   error_out:
    /* Add a label so that the back-end doesn't think that the beginning of
       the switch is unreachable.  Note that we do not add a case label, as
!      that just leads to duplicates and thence to failure later on.  */
    if (!cases->root)
      {
        tree t = create_artificial_label ();
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.647
diff -c -3 -p -r1.647 c-decl.c
*** c-decl.c	20 Apr 2005 16:41:29 -0000	1.647
--- c-decl.c	21 Apr 2005 13:57:49 -0000
*************** finish_function (void)
*** 6323,6329 ****
    if (warn_return_type
        && TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) != VOID_TYPE
        && !current_function_returns_value && !current_function_returns_null
!       /* Don't complain if we abort.  */
        && !current_function_returns_abnormally
        /* Don't warn for main().  */
        && !MAIN_NAME_P (DECL_NAME (fndecl))
--- 6323,6329 ----
    if (warn_return_type
        && TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) != VOID_TYPE
        && !current_function_returns_value && !current_function_returns_null
!       /* Don't complain if we are no-return.  */
        && !current_function_returns_abnormally
        /* Don't warn for main().  */
        && !MAIN_NAME_P (DECL_NAME (fndecl))
Index: caller-save.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/caller-save.c,v
retrieving revision 1.71
diff -c -3 -p -r1.71 caller-save.c
*** caller-save.c	23 Nov 2004 23:10:16 -0000	1.71
--- caller-save.c	21 Apr 2005 13:57:51 -0000
*************** insert_restore (struct insn_chain *chain
*** 637,648 ****
    struct insn_chain *new;
    rtx mem;
  
!   /* A common failure mode if register status is not correct in the RTL
!      is for this routine to be called with a REGNO we didn't expect to
!      save.  That will cause us to write an insn with a (nil) SET_DEST
!      or SET_SRC.  Instead of doing so and causing a crash later, check
!      for this common case and abort here instead.  This will remove one
!      step in debugging such problems.  */
    gcc_assert (regno_save_mem[regno][1]);
  
    /* Get the pattern to emit and update our status.
--- 637,648 ----
    struct insn_chain *new;
    rtx mem;
  
!   /* A common failure mode if register status is not correct in the
!      RTL is for this routine to be called with a REGNO we didn't
!      expect to save.  That will cause us to write an insn with a (nil)
!      SET_DEST or SET_SRC.  Instead of doing so and causing a crash
!      later, check for this common case here instead.  This will remove
!      one step in debugging such problems.  */
    gcc_assert (regno_save_mem[regno][1]);
  
    /* Get the pattern to emit and update our status.
*************** insert_save (struct insn_chain *chain, i
*** 710,720 ****
    struct insn_chain *new;
    rtx mem;
  
!   /* A common failure mode if register status is not correct in the RTL
!      is for this routine to be called with a REGNO we didn't expect to
!      save.  That will cause us to write an insn with a (nil) SET_DEST
!      or SET_SRC.  Instead of doing so and causing a crash later, check
!      for this common case and abort here instead.  This will remove one
       step in debugging such problems.  */
    gcc_assert (regno_save_mem[regno][1]);
  
--- 710,720 ----
    struct insn_chain *new;
    rtx mem;
  
!   /* A common failure mode if register status is not correct in the
!      RTL is for this routine to be called with a REGNO we didn't
!      expect to save.  That will cause us to write an insn with a (nil)
!      SET_DEST or SET_SRC.  Instead of doing so and causing a crash
!      later, check for this common case here.  This will remove one
       step in debugging such problems.  */
    gcc_assert (regno_save_mem[regno][1]);
  
Index: cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
retrieving revision 1.89
diff -c -3 -p -r1.89 cfg.c
*** cfg.c	21 Apr 2005 09:17:08 -0000	1.89
--- cfg.c	21 Apr 2005 13:57:52 -0000
*************** update_bb_profile_for_threading (basic_b
*** 895,902 ****
  	c->probability *= scale / 65536;
      }
  
!   if (bb != taken_edge->src)
!     abort ();
    taken_edge->count -= count;
    if (taken_edge->count < 0)
      taken_edge->count = 0;
--- 895,901 ----
  	c->probability *= scale / 65536;
      }
  
!   gcc_assert (bb == taken_edge->src);
    taken_edge->count -= count;
    if (taken_edge->count < 0)
      taken_edge->count = 0;
Index: cfganal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfganal.c,v
retrieving revision 1.61
diff -c -3 -p -r1.61 cfganal.c
*** cfganal.c	14 Mar 2005 15:19:56 -0000	1.61
--- cfganal.c	21 Apr 2005 13:57:56 -0000
*************** flow_active_insn_p (rtx insn)
*** 69,75 ****
       programs that fail to return a value.  Its effect is to
       keep the return value from being live across the entire
       function.  If we allow it to be skipped, we introduce the
!      possibility for register livetime aborts.  */
    if (GET_CODE (PATTERN (insn)) == CLOBBER
        && REG_P (XEXP (PATTERN (insn), 0))
        && REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0)))
--- 69,75 ----
       programs that fail to return a value.  Its effect is to
       keep the return value from being live across the entire
       function.  If we allow it to be skipped, we introduce the
!      possibility for register lifetime confusion.  */
    if (GET_CODE (PATTERN (insn)) == CLOBBER
        && REG_P (XEXP (PATTERN (insn), 0))
        && REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0)))
Index: cfgexpand.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgexpand.c,v
retrieving revision 2.36
diff -c -3 -p -r2.36 cfgexpand.c
*** cfgexpand.c	15 Apr 2005 03:16:19 -0000	2.36
--- cfgexpand.c	21 Apr 2005 13:57:57 -0000
*************** add_reg_br_prob_note (FILE *dump_file, r
*** 60,67 ****
  	    || GET_CODE (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))) != CODE_LABEL
  	    || NEXT_INSN (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))))
  	  goto failed;
! 	if (find_reg_note (last, REG_BR_PROB, 0))
! 	  abort ();
  	REG_NOTES (last)
  	  = gen_rtx_EXPR_LIST (REG_BR_PROB,
  			       GEN_INT (REG_BR_PROB_BASE - probability),
--- 60,66 ----
  	    || GET_CODE (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))) != CODE_LABEL
  	    || NEXT_INSN (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))))
  	  goto failed;
! 	gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
  	REG_NOTES (last)
  	  = gen_rtx_EXPR_LIST (REG_BR_PROB,
  			       GEN_INT (REG_BR_PROB_BASE - probability),
*************** add_reg_br_prob_note (FILE *dump_file, r
*** 69,77 ****
  	return;
        }
    if (!last || GET_CODE (last) != JUMP_INSN || !any_condjump_p (last))
!       goto failed;
!   if (find_reg_note (last, REG_BR_PROB, 0))
!     abort ();
    REG_NOTES (last)
      = gen_rtx_EXPR_LIST (REG_BR_PROB,
  			 GEN_INT (probability), REG_NOTES (last));
--- 68,75 ----
  	return;
        }
    if (!last || GET_CODE (last) != JUMP_INSN || !any_condjump_p (last))
!     goto failed;
!   gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
    REG_NOTES (last)
      = gen_rtx_EXPR_LIST (REG_BR_PROB,
  			 GEN_INT (probability), REG_NOTES (last));
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.169
diff -c -3 -p -r1.169 cfgrtl.c
*** cfgrtl.c	21 Apr 2005 09:17:11 -0000	1.169
--- cfgrtl.c	21 Apr 2005 13:58:03 -0000
*************** force_nonfallthru (edge e)
*** 1165,1171 ****
  
  /* Redirect edge even at the expense of creating new jump insn or
     basic block.  Return new basic block if created, NULL otherwise.
!    Abort if conversion is impossible.  */
  
  static basic_block
  rtl_redirect_edge_and_branch_force (edge e, basic_block target)
--- 1165,1171 ----
  
  /* Redirect edge even at the expense of creating new jump insn or
     basic block.  Return new basic block if created, NULL otherwise.
!    Conversion must be possible.  */
  
  static basic_block
  rtl_redirect_edge_and_branch_force (edge e, basic_block target)
*************** rtl_move_block_after (basic_block bb ATT
*** 1277,1283 ****
  }
  
  /* Split a (typically critical) edge.  Return the new block.
!    Abort on abnormal edges.
  
     ??? The code generally expects to be called on critical edges.
     The case of a block ending in an unconditional jump to a
--- 1277,1283 ----
  }
  
  /* Split a (typically critical) edge.  Return the new block.
!    The edge must not be abnormal.
  
     ??? The code generally expects to be called on critical edges.
     The case of a block ending in an unconditional jump to a
*************** cfg_layout_can_merge_blocks_p (basic_blo
*** 2695,2701 ****
  		  ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))));
  }
  
! /* Merge block A and B, abort when it is not possible.  */
  static void
  cfg_layout_merge_blocks (basic_block a, basic_block b)
  {
--- 2695,2702 ----
  		  ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))));
  }
  
! /* Merge block A and B.  The blocks must be mergeable.  */
! 
  static void
  cfg_layout_merge_blocks (basic_block a, basic_block b)
  {
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.185
diff -c -3 -p -r1.185 ifcvt.c
*** ifcvt.c	13 Apr 2005 14:39:28 -0000	1.185
--- ifcvt.c	21 Apr 2005 13:58:10 -0000
*************** cond_exec_process_insns (ce_if_block_t *
*** 269,276 ****
        if (NOTE_P (insn))
  	goto insn_done;
  
!       if (!NONJUMP_INSN_P (insn) && !CALL_P (insn))
! 	abort ();
  
        /* Remove USE insns that get in the way.  */
        if (reload_completed && GET_CODE (PATTERN (insn)) == USE)
--- 269,275 ----
        if (NOTE_P (insn))
  	goto insn_done;
  
!       gcc_assert(NONJUMP_INSN_P (insn) || CALL_P (insn));
  
        /* Remove USE insns that get in the way.  */
        if (reload_completed && GET_CODE (PATTERN (insn)) == USE)
*************** merge_if_block (struct ce_if_block * ce_
*** 2228,2257 ****
        /* The outgoing edge for the current COMBO block should already
  	 be correct.  Verify this.  */
        if (EDGE_COUNT (combo_bb->succs) == 0)
! 	{
! 	  if (find_reg_note (last, REG_NORETURN, NULL))
! 	    ;
! 	  else if (NONJUMP_INSN_P (last)
! 		   && GET_CODE (PATTERN (last)) == TRAP_IF
! 		   && TRAP_CONDITION (PATTERN (last)) == const_true_rtx)
! 	    ;
! 	  else
! 	    abort ();
! 	}
  
        /* There should still be something at the end of the THEN or ELSE
           blocks taking us to our final destination.  */
!       else if (JUMP_P (last))
! 	;
!       else if (EDGE_SUCC (combo_bb, 0)->dest == EXIT_BLOCK_PTR
! 	       && CALL_P (last)
! 	       && SIBLING_CALL_P (last))
! 	;
!       else if ((EDGE_SUCC (combo_bb, 0)->flags & EDGE_EH)
! 	       && can_throw_internal (last))
! 	;
!       else
! 	abort ();
      }
  
    /* The JOIN block may have had quite a number of other predecessors too.
--- 2227,2247 ----
        /* The outgoing edge for the current COMBO block should already
  	 be correct.  Verify this.  */
        if (EDGE_COUNT (combo_bb->succs) == 0)
! 	gcc_assert (find_reg_note (last, REG_NORETURN, NULL)
! 		    || (NONJUMP_INSN_P (last)
! 			&& GET_CODE (PATTERN (last)) == TRAP_IF
! 			&& (TRAP_CONDITION (PATTERN (last))
! 			    == const_true_rtx)));
  
+       else
        /* There should still be something at the end of the THEN or ELSE
           blocks taking us to our final destination.  */
! 	gcc_assert (JUMP_P (last)
! 		    || (EDGE_SUCC (combo_bb, 0)->dest == EXIT_BLOCK_PTR
! 			&& CALL_P (last)
! 			&& SIBLING_CALL_P (last))
! 		    || ((EDGE_SUCC (combo_bb, 0)->flags & EDGE_EH)
! 			&& can_throw_internal (last)));
      }
  
    /* The JOIN block may have had quite a number of other predecessors too.
*************** merge_if_block (struct ce_if_block * ce_
*** 2259,2265 ****
       have only one remaining edge from our if-then-else diamond.  If there
       is more than one remaining edge, it must come from elsewhere.  There
       may be zero incoming edges if the THEN block didn't actually join
!      back up (as with a call to abort).  */
    else if (EDGE_COUNT (join_bb->preds) < 2
  	   && join_bb != EXIT_BLOCK_PTR)
      {
--- 2249,2255 ----
       have only one remaining edge from our if-then-else diamond.  If there
       is more than one remaining edge, it must come from elsewhere.  There
       may be zero incoming edges if the THEN block didn't actually join
!      back up (as with a call to a non-return function).  */
    else if (EDGE_COUNT (join_bb->preds) < 2
  	   && join_bb != EXIT_BLOCK_PTR)
      {
*************** find_if_block (struct ce_if_block * ce_i
*** 2626,2632 ****
       we checked the FALLTHRU flag, those are already adjacent to the last IF
       block.  */
    /* ??? As an enhancement, move the ELSE block.  Have to deal with
!      BLOCK notes, if by no other means than aborting the merge if they
       exist.  Sticky enough I don't want to think about it now.  */
    next = then_bb;
    if (else_bb && (next = next->next_bb) != else_bb)
--- 2616,2622 ----
       we checked the FALLTHRU flag, those are already adjacent to the last IF
       block.  */
    /* ??? As an enhancement, move the ELSE block.  Have to deal with
!      BLOCK notes, if by no other means than backing out the merge if they
       exist.  Sticky enough I don't want to think about it now.  */
    next = then_bb;
    if (else_bb && (next = next->next_bb) != else_bb)
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.273
diff -c -3 -p -r1.273 integrate.c
*** integrate.c	19 Nov 2004 02:58:33 -0000	1.273
--- integrate.c	21 Apr 2005 13:58:10 -0000
*************** allocate_initial_values (rtx *reg_equiv_
*** 389,406 ****
        int regno = REGNO (ivs->entries[i].pseudo);
        rtx x = ALLOCATE_INITIAL_VALUE (ivs->entries[i].hard_reg);
  
!       if (x == NULL_RTX || REG_N_SETS (REGNO (ivs->entries[i].pseudo)) > 1)
! 	; /* Do nothing.  */
!       else if (MEM_P (x))
! 	reg_equiv_memory_loc[regno] = x;
!       else if (REG_P (x))
  	{
! 	  reg_renumber[regno] = REGNO (x);
! 	  /* Poke the regno right into regno_reg_rtx
! 	     so that even fixed regs are accepted.  */
! 	  REGNO (ivs->entries[i].pseudo) = REGNO (x);
  	}
-       else abort ();
      }
  #endif
  }
--- 389,407 ----
        int regno = REGNO (ivs->entries[i].pseudo);
        rtx x = ALLOCATE_INITIAL_VALUE (ivs->entries[i].hard_reg);
  
!       if (x && REG_N_SETS (REGNO (ivs->entries[i].pseudo)) <= 1)
  	{
! 	  if (MEM_P (x))
! 	    reg_equiv_memory_loc[regno] = x;
! 	  else
! 	    {
! 	      gcc_assert (REG_P (x));
! 	      reg_renumber[regno] = REGNO (x);
! 	      /* Poke the regno right into regno_reg_rtx so that even
! 	     	 fixed regs are accepted.  */
! 	      REGNO (ivs->entries[i].pseudo) = REGNO (x);
! 	    }
  	}
      }
  #endif
  }
Index: jump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/jump.c,v
retrieving revision 1.258
diff -c -3 -p -r1.258 jump.c
*** jump.c	21 Mar 2005 14:37:57 -0000	1.258
--- jump.c	21 Apr 2005 13:58:14 -0000
*************** reverse_condition (enum rtx_code code)
*** 511,517 ****
        return UNKNOWN;
  
      default:
!       abort ();
      }
  }
  
--- 511,517 ----
        return UNKNOWN;
  
      default:
!       gcc_unreachable ();
      }
  }
  
*************** reverse_condition_maybe_unordered (enum 
*** 554,560 ****
        return LTGT;
  
      default:
!       abort ();
      }
  }
  
--- 554,560 ----
        return LTGT;
  
      default:
!       gcc_unreachable ();
      }
  }
  
*************** swap_condition (enum rtx_code code)
*** 600,606 ****
        return UNLE;
  
      default:
!       abort ();
      }
  }
  
--- 600,606 ----
        return UNLE;
  
      default:
!       gcc_unreachable ();
      }
  }
  
*************** unsigned_condition (enum rtx_code code)
*** 631,637 ****
        return LEU;
  
      default:
!       abort ();
      }
  }
  
--- 631,637 ----
        return LEU;
  
      default:
!       gcc_unreachable ();
      }
  }
  
*************** signed_condition (enum rtx_code code)
*** 660,666 ****
        return LE;
  
      default:
!       abort ();
      }
  }
  
--- 660,666 ----
        return LE;
  
      default:
!       gcc_unreachable ();
      }
  }
  
*************** mark_jump_label (rtx x, rtx insn, int in
*** 1109,1116 ****
  	    && NOTE_LINE_NUMBER (label) == NOTE_INSN_DELETED_LABEL)
  	  break;
  
! 	if (!LABEL_P (label))
! 	  abort ();
  
  	/* Ignore references to labels of containing functions.  */
  	if (LABEL_REF_NONLOCAL_P (x))
--- 1109,1115 ----
  	    && NOTE_LINE_NUMBER (label) == NOTE_INSN_DELETED_LABEL)
  	  break;
  
! 	gcc_assert (LABEL_P (label));
  
  	/* Ignore references to labels of containing functions.  */
  	if (LABEL_REF_NONLOCAL_P (x))
*************** invert_jump_1 (rtx jump, rtx nlabel)
*** 1723,1732 ****
  {
    rtx x = pc_set (jump);
    int ochanges;
  
    ochanges = num_validated_changes ();
!   if (!x || !invert_exp_1 (SET_SRC (x), jump))
!     abort ();
    if (num_validated_changes () == ochanges)
      return 0;
  
--- 1722,1734 ----
  {
    rtx x = pc_set (jump);
    int ochanges;
+   int ok;
  
    ochanges = num_validated_changes ();
!   gcc_assert (x);
!   ok = invert_exp_1 (SET_SRC (x), jump);
!   gcc_assert (ok);
!   
    if (num_validated_changes () == ochanges)
      return 0;
  
*************** rtx_renumbered_equal_p (rtx x, rtx y)
*** 1941,1947 ****
  	  break;
  
  	default:
! 	  abort ();
  	}
      }
    return 1;
--- 1943,1949 ----
  	  break;
  
  	default:
! 	  gcc_unreachable ();
  	}
      }
    return 1;
*************** true_regnum (rtx x)
*** 1976,1984 ****
  unsigned int
  reg_or_subregno (rtx reg)
  {
-   if (REG_P (reg))
-     return REGNO (reg);
    if (GET_CODE (reg) == SUBREG)
!     return REGNO (SUBREG_REG (reg));
!   abort ();
  }
--- 1978,1985 ----
  unsigned int
  reg_or_subregno (rtx reg)
  {
    if (GET_CODE (reg) == SUBREG)
!     reg = SUBREG_REG (reg);
!   gcc_assert (REG_P (reg));
!   return REGNO (reg);
  }
Index: lambda-code.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/lambda-code.c,v
retrieving revision 2.35
diff -c -3 -p -r2.35 lambda-code.c
*** lambda-code.c	21 Apr 2005 09:17:19 -0000	2.35
--- lambda-code.c	21 Apr 2005 13:58:19 -0000
*************** lambda_compute_auxillary_space (lambda_l
*** 687,693 ****
  
    /* Unfortunately, we can't know the number of constraints we'll have
       ahead of time, but this should be enough even in ridiculous loop nest
!      cases. We abort if we go over this limit.  */
    A = lambda_matrix_new (128, depth);
    B = lambda_matrix_new (128, invariants);
    a = lambda_vector_new (128);
--- 687,693 ----
  
    /* Unfortunately, we can't know the number of constraints we'll have
       ahead of time, but this should be enough even in ridiculous loop nest
!      cases. We must not go over this limit.  */
    A = lambda_matrix_new (128, depth);
    B = lambda_matrix_new (128, invariants);
    a = lambda_vector_new (128);
*************** lambda_transform_legal_p (lambda_trans_m
*** 2483,2493 ****
    lambda_vector distres;
    struct data_dependence_relation *ddr;
  
! #if defined ENABLE_CHECKING
!   if (LTM_COLSIZE (trans) != nb_loops
!       || LTM_ROWSIZE (trans) != nb_loops)
!     abort ();
! #endif
  
    /* When there is an unknown relation in the dependence_relations, we
       know that it is no worth looking at this loop nest: give up.  */
--- 2483,2490 ----
    lambda_vector distres;
    struct data_dependence_relation *ddr;
  
!   gcc_assert (LTM_COLSIZE (trans) == nb_loops
! 	      && LTM_ROWSIZE (trans) == nb_loops);
  
    /* When there is an unknown relation in the dependence_relations, we
       know that it is no worth looking at this loop nest: give up.  */
Index: lambda-mat.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/lambda-mat.c,v
retrieving revision 2.8
diff -c -3 -p -r2.8 lambda-mat.c
*** lambda-mat.c	25 Sep 2004 14:36:37 -0000	2.8
--- lambda-mat.c	21 Apr 2005 13:58:20 -0000
*************** lambda_matrix_inverse_hard (lambda_matri
*** 401,409 ****
        row = temp[j];
        diagonal = row[j];
  
!       /* If the matrix is singular, abort.  */
!       if (diagonal == 0)
! 	abort ();
  
        determinant = determinant * diagonal;
  
--- 401,408 ----
        row = temp[j];
        diagonal = row[j];
  
!       /* The matrix must not be singular.  */
!       gcc_assert (diagonal);
  
        determinant = determinant * diagonal;
  
Index: langhooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/langhooks.c,v
retrieving revision 1.81
diff -c -3 -p -r1.81 langhooks.c
*** langhooks.c	21 Feb 2005 14:39:50 -0000	1.81
--- langhooks.c	21 Apr 2005 13:58:22 -0000
*************** lhd_set_decl_assembler_name (tree decl)
*** 158,194 ****
       DECL_ASSEMBLER_NAME for lots of DECLs.  Only FUNCTION_DECLs and
       VAR_DECLs for variables with static storage duration need a real
       DECL_ASSEMBLER_NAME.  */
!   if (TREE_CODE (decl) == FUNCTION_DECL
!       || (TREE_CODE (decl) == VAR_DECL
! 	  && (TREE_STATIC (decl)
! 	      || DECL_EXTERNAL (decl)
! 	      || TREE_PUBLIC (decl))))
      {
!       /* By default, assume the name to use in assembly code is the
! 	 same as that used in the source language.  (That's correct
! 	 for C, and GCC used to set DECL_ASSEMBLER_NAME to the same
! 	 value as DECL_NAME in build_decl, so this choice provides
! 	 backwards compatibility with existing front-ends.
! 
!          Can't use just the variable's own name for a variable whose
! 	 scope is less than the whole compilation.  Concatenate a
! 	 distinguishing number - we use the DECL_UID.  */
!       if (TREE_PUBLIC (decl) || DECL_CONTEXT (decl) == NULL_TREE)
! 	SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl));
!       else
! 	{
! 	  const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
! 	  char *label;
! 
! 	  ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl));
! 	  SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label));
! 	}
      }
-   else
-     /* Nobody should ever be asking for the DECL_ASSEMBLER_NAME of
-        these DECLs -- unless they're in language-dependent code, in
-        which case set_decl_assembler_name hook should handle things.  */
-     abort ();
  }
  
  /* By default we always allow bit-field based optimizations.  */
--- 158,188 ----
       DECL_ASSEMBLER_NAME for lots of DECLs.  Only FUNCTION_DECLs and
       VAR_DECLs for variables with static storage duration need a real
       DECL_ASSEMBLER_NAME.  */
!   gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
! 	      || (TREE_CODE (decl) == VAR_DECL
! 		  && (TREE_STATIC (decl)
! 		      || DECL_EXTERNAL (decl)
! 		      || TREE_PUBLIC (decl))));
!   
!   /* By default, assume the name to use in assembly code is the same
!      as that used in the source language.  (That's correct for C, and
!      GCC used to set DECL_ASSEMBLER_NAME to the same value as
!      DECL_NAME in build_decl, so this choice provides backwards
!      compatibility with existing front-ends.
!       
!      Can't use just the variable's own name for a variable whose scope
!      is less than the whole compilation.  Concatenate a distinguishing
!      number - we use the DECL_UID.  */
!   if (TREE_PUBLIC (decl) || DECL_CONTEXT (decl) == NULL_TREE)
!     SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl));
!   else
      {
!       const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
!       char *label;
!       
!       ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl));
!       SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label));
      }
  }
  
  /* By default we always allow bit-field based optimizations.  */
*************** lhd_can_use_bit_fields_p (void)
*** 202,208 ****
  tree
  lhd_type_promotes_to (tree ARG_UNUSED (type))
  {
!   abort ();
  }
  
  /* Registration of machine- or os-specific builtin types.  */
--- 196,202 ----
  tree
  lhd_type_promotes_to (tree ARG_UNUSED (type))
  {
!   gcc_unreachable ();
  }
  
  /* Registration of machine- or os-specific builtin types.  */
*************** lhd_register_builtin_type (tree ARG_UNUS
*** 216,225 ****
  void
  lhd_incomplete_type_error (tree ARG_UNUSED (value), tree type)
  {
!   if (TREE_CODE (type) == ERROR_MARK)
!     return;
! 
!   abort ();
  }
  
  /* Provide a default routine for alias sets that always returns -1.  This
--- 210,217 ----
  void
  lhd_incomplete_type_error (tree ARG_UNUSED (value), tree type)
  {
!   gcc_assert (TREE_CODE (type) == ERROR_MARK);
!   return;
  }
  
  /* Provide a default routine for alias sets that always returns -1.  This
*************** lhd_expand_expr (tree ARG_UNUSED (t), rt
*** 248,254 ****
  		 int ARG_UNUSED (em),
  		 rtx * ARG_UNUSED (a))
  {
!   abort ();
  }
  
  /* The default language-specific function for expanding a decl.  After
--- 240,246 ----
  		 int ARG_UNUSED (em),
  		 rtx * ARG_UNUSED (a))
  {
!   gcc_unreachable ();
  }
  
  /* The default language-specific function for expanding a decl.  After
*************** lhd_types_compatible_p (tree x, tree y)
*** 288,297 ****
     handle language-specific tree codes, as well as language-specific
     information associated to common tree codes.  If a tree node is
     completely handled within this function, it should set *SUBTREES to
!    0, so that generic handling isn't attempted.  For language-specific
!    tree codes, generic handling would abort(), so make sure it is set
!    properly.  Both SUBTREES and *SUBTREES is guaranteed to be nonzero
!    when the function is called.  */
  
  tree
  lhd_tree_inlining_walk_subtrees (tree *tp ATTRIBUTE_UNUSED,
--- 280,289 ----
     handle language-specific tree codes, as well as language-specific
     information associated to common tree codes.  If a tree node is
     completely handled within this function, it should set *SUBTREES to
!    0, so that generic handling isn't attempted.  The generic handling
!    cannot deal with language-specific tree codes, so make sure it is
!    set properly.  Both SUBTREES and *SUBTREES is guaranteed to be
!    nonzero when the function is called.  */
  
  tree
  lhd_tree_inlining_walk_subtrees (tree *tp ATTRIBUTE_UNUSED,
*************** lhd_gimplify_expr (tree *expr_p ATTRIBUT
*** 444,451 ****
  size_t
  lhd_tree_size (enum tree_code c ATTRIBUTE_UNUSED)
  {
!   abort ();
!   return 0;
  }
  
  /* Return true if decl, which is a function decl, may be called by a
--- 436,442 ----
  size_t
  lhd_tree_size (enum tree_code c ATTRIBUTE_UNUSED)
  {
!   gcc_unreachable ();
  }
  
  /* Return true if decl, which is a function decl, may be called by a
Index: lcm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/lcm.c,v
retrieving revision 1.72
diff -c -3 -p -r1.72 lcm.c
*** lcm.c	11 Mar 2005 09:05:02 -0000	1.72
--- lcm.c	21 Apr 2005 13:58:24 -0000
*************** create_pre_exit (int n_entities, int *en
*** 1101,1123 ****
  		last_insn = return_copy;
  	      }
  	    while (nregs);
  	    /* If we didn't see a full return value copy, verify that there
  	       is a plausible reason for this.  If some, but not all of the
  	       return register is likely spilled, we can expect that there
  	       is a copy for the likely spilled part.  */
! 	    if (nregs
! 		&& ! forced_late_switch
! 		&& ! short_block
! 		&& CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (ret_start))
! 		&& nregs == hard_regno_nregs[ret_start][GET_MODE (ret_reg)]
! 		/* For multi-hard-register floating point values,
! 		   sometimes the likely-spilled part is ordinarily copied
! 		   first, then the other part is set with an arithmetic
! 		   operation.  This doesn't actually cause reload failures,
! 		   so let it pass.  */
! 		&& (GET_MODE_CLASS (GET_MODE (ret_reg)) == MODE_INT
! 		    || nregs == 1))
! 	      abort ();
  	    if (INSN_P (last_insn))
  	      {
  		before_return_copy
--- 1101,1127 ----
  		last_insn = return_copy;
  	      }
  	    while (nregs);
+ 	    
  	    /* If we didn't see a full return value copy, verify that there
  	       is a plausible reason for this.  If some, but not all of the
  	       return register is likely spilled, we can expect that there
  	       is a copy for the likely spilled part.  */
! 	    gcc_assert (!nregs
! 			|| forced_late_switch
! 			|| short_block
! 			|| !(CLASS_LIKELY_SPILLED_P
! 			     (REGNO_REG_CLASS (ret_start)))
! 			|| (nregs
! 			    != hard_regno_nregs[ret_start][GET_MODE (ret_reg)])
! 			/* For multi-hard-register floating point
! 		   	   values, sometimes the likely-spilled part
! 		   	   is ordinarily copied first, then the other
! 		   	   part is set with an arithmetic operation.
! 		   	   This doesn't actually cause reload
! 		   	   failures, so let it pass.  */
! 			|| (GET_MODE_CLASS (GET_MODE (ret_reg)) != MODE_INT
! 			    && nregs != 1));
! 	    
  	    if (INSN_P (last_insn))
  	      {
  		before_return_copy
*************** optimize_mode_switching (FILE *file)
*** 1370,1390 ****
  		  emited = true;
  		  if (JUMP_P (BB_END (src_bb)))
  		    emit_insn_before (mode_set, BB_END (src_bb));
- 		  /* It doesn't make sense to switch to normal mode
- 		     after a CALL_INSN, so we're going to abort if we
- 		     find one.  The cases in which a CALL_INSN may
- 		     have an abnormal edge are sibcalls and EH edges.
- 		     In the case of sibcalls, the dest basic-block is
- 		     the EXIT_BLOCK, that runs in normal mode; it is
- 		     assumed that a sibcall insn requires normal mode
- 		     itself, so no mode switch would be required after
- 		     the call (it wouldn't make sense, anyway).  In
- 		     the case of EH edges, EH entry points also start
- 		     in normal mode, so a similar reasoning applies.  */
- 		  else if (NONJUMP_INSN_P (BB_END (src_bb)))
- 		    emit_insn_after (mode_set, BB_END (src_bb));
  		  else
! 		    abort ();
  		  bb_info[j][src_bb->index].computing = mode;
  		  RESET_BIT (transp[src_bb->index], j);
  		}
--- 1374,1396 ----
  		  emited = true;
  		  if (JUMP_P (BB_END (src_bb)))
  		    emit_insn_before (mode_set, BB_END (src_bb));
  		  else
! 		    {
! 		      /* It doesn't make sense to switch to normal
! 		         mode after a CALL_INSN.  The cases in which a
! 		         CALL_INSN may have an abnormal edge are
! 		         sibcalls and EH edges.  In the case of
! 		         sibcalls, the dest basic-block is the
! 		         EXIT_BLOCK, that runs in normal mode; it is
! 		         assumed that a sibcall insn requires normal
! 		         mode itself, so no mode switch would be
! 		         required after the call (it wouldn't make
! 		         sense, anyway).  In the case of EH edges, EH
! 		         entry points also start in normal mode, so a
! 		         similar reasoning applies.  */
! 		      gcc_assert (NONJUMP_INSN_P (BB_END (src_bb)));
! 		      emit_insn_after (mode_set, BB_END (src_bb));
! 		    }
  		  bb_info[j][src_bb->index].computing = mode;
  		  RESET_BIT (transp[src_bb->index], j);
  		}
Index: local-alloc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/local-alloc.c,v
retrieving revision 1.145
diff -c -3 -p -r1.145 local-alloc.c
*** local-alloc.c	1 Apr 2005 14:17:32 -0000	1.145
--- local-alloc.c	21 Apr 2005 13:58:30 -0000
*************** update_equiv_regs (void)
*** 1088,1095 ****
  		      REG_NOTES (new_insn) = REG_NOTES (equiv_insn);
  		      REG_NOTES (equiv_insn) = 0;
  
! 		      /* Make sure this insn is recognized before reload begins,
! 			 otherwise eliminate_regs_in_insn will abort.  */
  		      INSN_CODE (new_insn) = INSN_CODE (equiv_insn);
  
  		      delete_insn (equiv_insn);
--- 1088,1096 ----
  		      REG_NOTES (new_insn) = REG_NOTES (equiv_insn);
  		      REG_NOTES (equiv_insn) = 0;
  
! 		      /* Make sure this insn is recognized before
! 			 reload begins, otherwise
! 			 eliminate_regs_in_insn will die.  */
  		      INSN_CODE (new_insn) = INSN_CODE (equiv_insn);
  
  		      delete_insn (equiv_insn);
Index: loop-unroll.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop-unroll.c,v
retrieving revision 1.30
diff -c -3 -p -r1.30 loop-unroll.c
*** loop-unroll.c	9 Apr 2005 16:09:11 -0000	1.30
--- loop-unroll.c	21 Apr 2005 13:58:34 -0000
*************** peel_loop_completely (struct loops *loop
*** 495,500 ****
--- 495,502 ----
  
    if (npeel)
      {
+       bool ok;
+       
        wont_exit = sbitmap_alloc (npeel + 1);
        sbitmap_ones (wont_exit);
        RESET_BIT (wont_exit, 0);
*************** peel_loop_completely (struct loops *loop
*** 508,518 ****
          opt_info = analyze_insns_in_loop (loop);
        
        opt_info_start_duplication (opt_info);
!       if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 		loops, npeel,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
! 	abort ();
  
        free (wont_exit);
        
--- 510,521 ----
          opt_info = analyze_insns_in_loop (loop);
        
        opt_info_start_duplication (opt_info);
!       ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 					  loops, npeel,
! 					  wont_exit, desc->out_edge,
! 					  remove_edges, &n_remove_edges,
! 					  DLTHE_FLAG_UPDATE_FREQ);
!       gcc_assert (ok);
  
        free (wont_exit);
        
*************** unroll_loop_constant_iterations (struct 
*** 670,675 ****
--- 673,679 ----
    struct niter_desc *desc = get_simple_loop_desc (loop);
    bool exit_at_end = loop_exit_at_end_p (loop);
    struct opt_info *opt_info = NULL;
+   bool ok;
    
    niter = desc->niter;
  
*************** unroll_loop_constant_iterations (struct 
*** 704,715 ****
        if (exit_mod)
  	{
  	  opt_info_start_duplication (opt_info);
!           if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
  					      loops, exit_mod,
  					      wont_exit, desc->out_edge,
  					      remove_edges, &n_remove_edges,
! 					      DLTHE_FLAG_UPDATE_FREQ))
! 	    abort ();
  
            if (opt_info && exit_mod > 1)
   	    apply_opt_in_copies (opt_info, exit_mod, false, false); 
--- 708,719 ----
        if (exit_mod)
  	{
  	  opt_info_start_duplication (opt_info);
!           ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
  					      loops, exit_mod,
  					      wont_exit, desc->out_edge,
  					      remove_edges, &n_remove_edges,
! 					      DLTHE_FLAG_UPDATE_FREQ);
! 	  gcc_assert (ok);
  
            if (opt_info && exit_mod > 1)
   	    apply_opt_in_copies (opt_info, exit_mod, false, false); 
*************** unroll_loop_constant_iterations (struct 
*** 740,750 ****
  	    RESET_BIT (wont_exit, 1);
           
            opt_info_start_duplication (opt_info);
! 	  if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 		loops, exit_mod + 1,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
! 	    abort ();
   
            if (opt_info && exit_mod > 0)
    	    apply_opt_in_copies (opt_info, exit_mod + 1, false, false);
--- 744,755 ----
  	    RESET_BIT (wont_exit, 1);
           
            opt_info_start_duplication (opt_info);
! 	  ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 					      loops, exit_mod + 1,
! 					      wont_exit, desc->out_edge,
! 					      remove_edges, &n_remove_edges,
! 					      DLTHE_FLAG_UPDATE_FREQ);
! 	  gcc_assert (ok);
   
            if (opt_info && exit_mod > 0)
    	    apply_opt_in_copies (opt_info, exit_mod + 1, false, false);
*************** unroll_loop_constant_iterations (struct 
*** 763,773 ****
    /* Now unroll the loop.  */
    
    opt_info_start_duplication (opt_info);
!   if (!duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 		loops, max_unroll,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
!     abort ();
  
    if (opt_info)
      {
--- 768,779 ----
    /* Now unroll the loop.  */
    
    opt_info_start_duplication (opt_info);
!   ok = duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 				      loops, max_unroll,
! 				      wont_exit, desc->out_edge,
! 				      remove_edges, &n_remove_edges,
! 				      DLTHE_FLAG_UPDATE_FREQ);
!   gcc_assert (ok);
  
    if (opt_info)
      {
*************** unroll_loop_runtime_iterations (struct l
*** 935,940 ****
--- 941,947 ----
    struct niter_desc *desc = get_simple_loop_desc (loop);
    bool exit_at_end = loop_exit_at_end_p (loop);
    struct opt_info *opt_info = NULL;
+   bool ok;
    
    if (flag_split_ivs_in_unroller
        || flag_variable_expansion_in_unroller)
*************** unroll_loop_runtime_iterations (struct l
*** 1013,1023 ****
        && !desc->noloop_assumptions)
      SET_BIT (wont_exit, 1);
    ezc_swtch = loop_preheader_edge (loop)->src;
!   if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 		loops, 1,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
!     abort ();
  
    /* Record the place where switch will be built for preconditioning.  */
    swtch = loop_split_edge_with (loop_preheader_edge (loop),
--- 1020,1031 ----
        && !desc->noloop_assumptions)
      SET_BIT (wont_exit, 1);
    ezc_swtch = loop_preheader_edge (loop)->src;
!   ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 				      loops, 1,
! 				      wont_exit, desc->out_edge,
! 				      remove_edges, &n_remove_edges,
! 				      DLTHE_FLAG_UPDATE_FREQ);
!   gcc_assert (ok);
  
    /* Record the place where switch will be built for preconditioning.  */
    swtch = loop_split_edge_with (loop_preheader_edge (loop),
*************** unroll_loop_runtime_iterations (struct l
*** 1029,1039 ****
        sbitmap_zero (wont_exit);
        if (i != n_peel - 1 || !last_may_exit)
  	SET_BIT (wont_exit, 1);
!       if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 		loops, 1,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
! 	abort ();
  
        /* Create item for switch.  */
        j = n_peel - i - (extra_zero_check ? 0 : 1);
--- 1037,1048 ----
        sbitmap_zero (wont_exit);
        if (i != n_peel - 1 || !last_may_exit)
  	SET_BIT (wont_exit, 1);
!       ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 					  loops, 1,
! 					  wont_exit, desc->out_edge,
! 					  remove_edges, &n_remove_edges,
! 					  DLTHE_FLAG_UPDATE_FREQ);
!       gcc_assert (ok);
  
        /* Create item for switch.  */
        j = n_peel - i - (extra_zero_check ? 0 : 1);
*************** unroll_loop_runtime_iterations (struct l
*** 1041,1047 ****
  
        preheader = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);
        branch_code = compare_and_jump_seq (copy_rtx (niter), GEN_INT (j), EQ,
! 					  block_label (preheader), p, NULL_RTX);
  
        swtch = loop_split_edge_with (single_pred_edge (swtch), branch_code);
        set_immediate_dominator (CDI_DOMINATORS, preheader, swtch);
--- 1050,1057 ----
  
        preheader = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);
        branch_code = compare_and_jump_seq (copy_rtx (niter), GEN_INT (j), EQ,
! 					  block_label (preheader), p,
! 					  NULL_RTX);
  
        swtch = loop_split_edge_with (single_pred_edge (swtch), branch_code);
        set_immediate_dominator (CDI_DOMINATORS, preheader, swtch);
*************** unroll_loop_runtime_iterations (struct l
*** 1058,1064 ****
        swtch = ezc_swtch;
        preheader = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);
        branch_code = compare_and_jump_seq (copy_rtx (niter), const0_rtx, EQ,
! 					  block_label (preheader), p, NULL_RTX);
  
        swtch = loop_split_edge_with (single_succ_edge (swtch), branch_code);
        set_immediate_dominator (CDI_DOMINATORS, preheader, swtch);
--- 1068,1075 ----
        swtch = ezc_swtch;
        preheader = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX);
        branch_code = compare_and_jump_seq (copy_rtx (niter), const0_rtx, EQ,
! 					  block_label (preheader), p,
! 					  NULL_RTX);
  
        swtch = loop_split_edge_with (single_succ_edge (swtch), branch_code);
        set_immediate_dominator (CDI_DOMINATORS, preheader, swtch);
*************** unroll_loop_runtime_iterations (struct l
*** 1077,1087 ****
    RESET_BIT (wont_exit, may_exit_copy);
    opt_info_start_duplication (opt_info);
    
!   if (!duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 		loops, max_unroll,
! 		wont_exit, desc->out_edge, remove_edges, &n_remove_edges,
! 		DLTHE_FLAG_UPDATE_FREQ))
!     abort ();
    
    if (opt_info)
      {
--- 1088,1099 ----
    RESET_BIT (wont_exit, may_exit_copy);
    opt_info_start_duplication (opt_info);
    
!   ok = duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 				      loops, max_unroll,
! 				      wont_exit, desc->out_edge,
! 				      remove_edges, &n_remove_edges,
! 				      DLTHE_FLAG_UPDATE_FREQ);
!   gcc_assert (ok);
    
    if (opt_info)
      {
*************** unroll_loop_runtime_iterations (struct l
*** 1094,1100 ****
    if (exit_at_end)
      {
        basic_block exit_block = desc->in_edge->src->rbi->copy;
!       /* Find a new in and out edge; they are in the last copy we have made.  */
        
        if (EDGE_SUCC (exit_block, 0)->dest == desc->out_edge->dest)
  	{
--- 1106,1113 ----
    if (exit_at_end)
      {
        basic_block exit_block = desc->in_edge->src->rbi->copy;
!       /* Find a new in and out edge; they are in the last copy we have
! 	 made.  */
        
        if (EDGE_SUCC (exit_block, 0)->dest == desc->out_edge->dest)
  	{
*************** unroll_loop_runtime_iterations (struct l
*** 1119,1125 ****
       the correct new number of iterations is this:  */
    gcc_assert (!desc->const_iter);
    desc->niter_expr =
!     simplify_gen_binary (UDIV, desc->mode, old_niter, GEN_INT (max_unroll + 1));
    desc->niter_max /= max_unroll + 1;
    if (exit_at_end)
      {
--- 1132,1139 ----
       the correct new number of iterations is this:  */
    gcc_assert (!desc->const_iter);
    desc->niter_expr =
!     simplify_gen_binary (UDIV, desc->mode, old_niter,
! 			 GEN_INT (max_unroll + 1));
    desc->niter_max /= max_unroll + 1;
    if (exit_at_end)
      {
*************** peel_loop_simple (struct loops *loops, s
*** 1242,1247 ****
--- 1256,1262 ----
    unsigned npeel = loop->lpt_decision.times;
    struct niter_desc *desc = get_simple_loop_desc (loop);
    struct opt_info *opt_info = NULL;
+   bool ok;
    
    if (flag_split_ivs_in_unroller && npeel > 1)
      opt_info = analyze_insns_in_loop (loop);
*************** peel_loop_simple (struct loops *loops, s
*** 1251,1260 ****
    
    opt_info_start_duplication (opt_info);
    
!   if (!duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 		loops, npeel, wont_exit, NULL, NULL, NULL,
! 		DLTHE_FLAG_UPDATE_FREQ))
!     abort ();
  
    free (wont_exit);
    
--- 1266,1276 ----
    
    opt_info_start_duplication (opt_info);
    
!   ok = duplicate_loop_to_header_edge (loop, loop_preheader_edge (loop),
! 				      loops, npeel, wont_exit,
! 				      NULL, NULL,
! 				      NULL, DLTHE_FLAG_UPDATE_FREQ);
!   gcc_assert (ok);
  
    free (wont_exit);
    
*************** unroll_loop_stupid (struct loops *loops,
*** 1387,1392 ****
--- 1403,1409 ----
    unsigned nunroll = loop->lpt_decision.times;
    struct niter_desc *desc = get_simple_loop_desc (loop);
    struct opt_info *opt_info = NULL;
+   bool ok;
    
    if (flag_split_ivs_in_unroller
        || flag_variable_expansion_in_unroller)
*************** unroll_loop_stupid (struct loops *loops,
*** 1397,1406 ****
    sbitmap_zero (wont_exit);
    opt_info_start_duplication (opt_info);
    
!   if (!duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 		loops, nunroll, wont_exit, NULL, NULL, NULL,
! 		DLTHE_FLAG_UPDATE_FREQ))
!     abort ();
    
    if (opt_info)
      {
--- 1414,1424 ----
    sbitmap_zero (wont_exit);
    opt_info_start_duplication (opt_info);
    
!   ok = duplicate_loop_to_header_edge (loop, loop_latch_edge (loop),
! 				      loops, nunroll, wont_exit,
! 				      NULL, NULL, NULL,
! 				      DLTHE_FLAG_UPDATE_FREQ);
!   gcc_assert (ok);
    
    if (opt_info)
      {
*************** analyze_iv_to_split_insn (rtx insn)
*** 1599,1604 ****
--- 1617,1623 ----
    rtx set, dest;
    struct rtx_iv iv;
    struct iv_to_split *ivts;
+   bool ok;
  
    /* For now we just split the basic induction variables.  Later this may be
       extended for example by selecting also addresses of memory references.  */
*************** analyze_iv_to_split_insn (rtx insn)
*** 1613,1620 ****
    if (!biv_p (insn, dest))
      return NULL;
  
!   if (!iv_analyze (insn, dest, &iv))
!     abort ();
  
    if (iv.step == const0_rtx
        || iv.mode != iv.extend_mode)
--- 1632,1639 ----
    if (!biv_p (insn, dest))
      return NULL;
  
!   ok = iv_analyze (insn, dest, &iv);
!   gcc_assert (ok);
  
    if (iv.step == const0_rtx
        || iv.mode != iv.extend_mode)
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.527
diff -c -3 -p -r1.527 loop.c
*** loop.c	16 Apr 2005 21:42:26 -0000	1.527
--- loop.c	21 Apr 2005 13:58:59 -0000
*************** struct loop_info
*** 424,430 ****
  #ifndef HAVE_prefetch
  #define HAVE_prefetch 0
  #define CODE_FOR_prefetch 0
! #define gen_prefetch(a,b,c) (abort(), NULL_RTX)
  #endif
  
  /* Give up the prefetch optimizations once we exceed a given threshold.
--- 424,430 ----
  #ifndef HAVE_prefetch
  #define HAVE_prefetch 0
  #define CODE_FOR_prefetch 0
! #define gen_prefetch(a,b,c) (gcc_unreachable (), NULL_RTX)
  #endif
  
  /* Give up the prefetch optimizations once we exceed a given threshold.
*************** find_and_verify_loops (rtx f, struct loo
*** 3280,3285 ****
--- 3280,3286 ----
  		    if (invert_jump (p, new_label, 1))
  		      {
  			rtx q, r;
+ 			bool only_notes;
  
  			/* If no suitable BARRIER was found, create a suitable
  			   one before TARGET.  Since TARGET is a fall through
*************** find_and_verify_loops (rtx f, struct loo
*** 3304,3311 ****
  
  			/* Include the BARRIER after INSN and copy the
  			   block after LOC.  */
! 			if (squeeze_notes (&new_label, &last_insn_to_move))
! 			  abort ();
  			reorder_insns (new_label, last_insn_to_move, loc);
  
  			/* All those insns are now in TARGET_LOOP.  */
--- 3305,3314 ----
  
  			/* Include the BARRIER after INSN and copy the
  			   block after LOC.  */
! 			only_notes = squeeze_notes (&new_label,
! 						    &last_insn_to_move);
! 			gcc_assert (!only_notes);
! 			
  			reorder_insns (new_label, last_insn_to_move, loc);
  
  			/* All those insns are now in TARGET_LOOP.  */
*************** basic_induction_var (const struct loop *
*** 7649,7657 ****
      case CONST_INT:
      case SYMBOL_REF:
      case CONST:
!       /* convert_modes aborts if we try to convert to or from CCmode, so just
           exclude that case.  It is very unlikely that a condition code value
! 	 would be a useful iterator anyways.  convert_modes aborts if we try to
  	 convert a float mode to non-float or vice versa too.  */
        if (loop->level == 1
  	  && GET_MODE_CLASS (mode) == GET_MODE_CLASS (GET_MODE (dest_reg))
--- 7652,7660 ----
      case CONST_INT:
      case SYMBOL_REF:
      case CONST:
!       /* convert_modes dies if we try to convert to or from CCmode, so just
           exclude that case.  It is very unlikely that a condition code value
! 	 would be a useful iterator anyways.  convert_modes dies if we try to
  	 convert a float mode to non-float or vice versa too.  */
        if (loop->level == 1
  	  && GET_MODE_CLASS (mode) == GET_MODE_CLASS (GET_MODE (dest_reg))
Index: modulo-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/modulo-sched.c,v
retrieving revision 1.27
diff -c -3 -p -r1.27 modulo-sched.c
*** modulo-sched.c	17 Apr 2005 06:35:43 -0000	1.27
--- modulo-sched.c	21 Apr 2005 13:59:04 -0000
*************** normalize_sched_times (partial_schedule_
*** 638,645 ****
        ddg_node_ptr u = &g->nodes[i];
        int normalized_time = SCHED_TIME (u) - amount;
  
!       if (normalized_time < 0)
! 	abort ();
  
        SCHED_TIME (u) = normalized_time;
        SCHED_ROW (u) = normalized_time % ii;
--- 638,644 ----
        ddg_node_ptr u = &g->nodes[i];
        int normalized_time = SCHED_TIME (u) - amount;
  
!       gcc_assert (normalized_time >= 0);
  
        SCHED_TIME (u) = normalized_time;
        SCHED_ROW (u) = normalized_time % ii;
*************** check_nodes_order (int *node_order, int 
*** 1733,1740 ****
      {
        int u = node_order[i];
  
!       if (u >= num_nodes || u < 0 || TEST_BIT (tmp, u))
! 	abort ();
  
        SET_BIT (tmp, u);
      }
--- 1732,1738 ----
      {
        int u = node_order[i];
  
!       gcc_assert (u < num_nodes && u >= 0 && !TEST_BIT (tmp, u));
  
        SET_BIT (tmp, u);
      }
Index: value-prof.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/value-prof.c,v
retrieving revision 1.25
diff -c -3 -p -r1.25 value-prof.c
*** value-prof.c	21 Apr 2005 09:17:35 -0000	1.25
--- value-prof.c	21 Apr 2005 13:59:08 -0000
*************** tree_find_values_to_profile (histogram_v
*** 1789,1795 ****
  	  break;
  
  	default:
! 	  abort ();
  	}
      }
  }
--- 1789,1795 ----
  	  break;
  
  	default:
! 	  gcc_unreachable ();
  	}
      }
  }
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.500
diff -c -3 -p -r1.500 varasm.c
*** varasm.c	21 Apr 2005 09:17:36 -0000	1.500
--- varasm.c	21 Apr 2005 13:59:19 -0000
*************** named_section (tree decl, const char *na
*** 470,476 ****
    flags = targetm.section_type_flags (decl, name, reloc);
  
    /* Sanity check user variables for flag changes.  Non-user
!      section flag changes will abort in named_section_flags.
       However, don't complain if SECTION_OVERRIDE is set.
       We trust that the setter knows that it is safe to ignore
       the default flags for this decl.  */
--- 470,476 ----
    flags = targetm.section_type_flags (decl, name, reloc);
  
    /* Sanity check user variables for flag changes.  Non-user
!      section flag changes will die in named_section_flags.
       However, don't complain if SECTION_OVERRIDE is set.
       We trust that the setter knows that it is safe to ignore
       the default flags for this decl.  */
*************** default_assemble_integer (rtx x ATTRIBUT
*** 2170,2177 ****
  
  /* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
     the alignment of the integer in bits.  Return 1 if we were able to output
!    the constant, otherwise 0.  If FORCE is nonzero, abort if we can't output
!    the constant.  */
  
  bool
  assemble_integer (rtx x, unsigned int size, unsigned int align, int force)
--- 2170,2177 ----
  
  /* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
     the alignment of the integer in bits.  Return 1 if we were able to output
!    the constant, otherwise 0.  We must be able to output the constant,
!    if FORCE is nonzero.  */
  
  bool
  assemble_integer (rtx x, unsigned int size, unsigned int align, int force)
*************** assemble_real (REAL_VALUE_TYPE d, enum m
*** 2259,2265 ****
  /* Given an expression EXP with a constant value,
     reduce it to the sum of an assembler symbol and an integer.
     Store them both in the structure *VALUE.
!    Abort if EXP does not reduce.  */
  
  struct addr_const GTY(())
  {
--- 2259,2265 ----
  /* Given an expression EXP with a constant value,
     reduce it to the sum of an assembler symbol and an integer.
     Store them both in the structure *VALUE.
!    EXP must be reduceable.  */
  
  struct addr_const GTY(())
  {

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