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]

[PATCH] Localized CFG cleanup and IPA branch merge plans


Hi,
this patch is purely mechanical cleanup after CFG localizing changes done in 4.1,
but I would like to write a bit about IPA merging as well, since people worried.

I still would like to finally proceed somewhat with merging the IPA
branch.  After all the delays (I was dragged into non-GCC work for
basically whole last month, but I hope to be back in regular schedule
now) and given that it is pretty late stage2 I don't think it makes
sense to stick on the original intent to fully merge it.

The changes in IPA branch can be however merged incrementally
approximately this way:

1) infrastructure for multiple SSA forms at a time
2) cleanups needed to get SSA forms built (especially changes to annotations)
3) inliner changes so it can work on SSA
4) other opts + SSA.

While 3) is where most of my effort lies, for merging and design standpoint, 2)
is the funniest part.  The IPA branch implementation is not very pretty in some
details and what I would hope to do now (if it seems to make sense) is to start
with localization of tree-SSA and continue with the changes belonging to 2) with
some discussion on details.
Once this is done and if stage 3 is still not there, we can consider 3) but
that is not too important now and I would be happy to wait with it to 4.3.
Having the localization changes merged would make it a lot easier to
maintain IPA branch and hopefully will prevent us from desigining
datastructures in a way making them dificult to privatize (such as
current aliasing info).

And now to the patch.  At CFG merging time I promised to remove macros hidding
the localized variables at late stage2 (to minimize impact on branch merging)
that didn't happen since I missed that timeframe.  Since I would like to do
same trick this time, it is probably good idea to realize my promise.  The
patch elliminates ENTRY/EXIT_BLOCK_PTR macros and is mostly mechanical
substitution with some reformating for 80 characters long lines.  I did little
changes to cfg.c where FOR_ALL_BB was better than the expanded variant.

Since this patch is going to be nasty to maintiners of branches (including me),
I would be happy to hear sane ideas for postnoting it, but it seems to me that
delaying it now doesn't make much sense since new branches relative to mainline
are being created too.

Bootstrapped/regtested i686-pc-gnu-linux, OK?
	
	* basic-block.h: Remove EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION.
	(sturct cfg): Rename x_entry_block_ptr to entry_block_ptr and
	x_exit_block_ptr to exit_block_ptr.
	Replace uses of EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION by direct
	accesses.
	* cfg.c: Use FOR_ALL_BB where appropriate;
	Replace uses of EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION by direct
	accesses.
	* tree-vrp.c: Replace uses of EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION by direct
	accesses.
	* loop-unswitch.c: Likewise.
	* sched-ebb.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* sbitmap.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tracer.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* postreload-gcse.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-tailcall.c: Likewise.
	* reload.c: Likewise.
	* ipa-cp.c: Likewise.
	* final.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloopanal.c: Likewise.
	* omp-low.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* cgraphunit.c: Likewise.
	* regs.h: Likewise.
	* flow.c: Likewise.
	* df-scan.c: Likewise.
	* haifa-sched.c: Likewise.
	* dominance.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* graph.c: Likewise.
	* cse.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* loop-init.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* cfganal.c: Likewise.
	* global.c: Likewise.
	* ifcvt.c: Likewise.
	* cfgbuild.c: Likewise.
	* predict.c: Likewise.
	* lcm.c: Likewise.
	* regmove.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* tree-if-conv.c: Likewise.
	* profile.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* rtl-factoring.c: Likewise.
	* bt-load.c: Likewise.
	* except.c: Likewise.
	* cfgexpand.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* cfgcleanup.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-mudflap.c: Likewise.
	* loop-iv.c: Likewise.
	* cfglayout.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* varasm.c: Likewise.
	* lambda-code.c: Likewise.
	* tree-inline.c: Likewise.
	* sched-int.h: Likewise.
	* combine.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* bb-reorder.c: Likewise.
	* resource.c: Likewise.
	* var-tracking.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* df-problems.c: Likewise.
	* reg-stack.c: Likewise.
	* sched-rgn.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/mt/mt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* cfgrtl.c: Likewise.
	* tree-vrp.c: Likewise.
===================================================================
-c -L tree-vrp.c	(revision 112224) -L tree-vrp.c	(working copy) .svn/text-base/tree-vrp.c.svn-base tree-vrp.c
*** tree-vrp.c	(revision 112224)
--- tree-vrp.c	(working copy)
*************** insert_range_assertions (void)
*** 3164,3170 ****
    calculate_dominance_info (CDI_DOMINATORS);
  
    update_ssa_p = false;
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      if (find_assert_locations (e->dest))
        update_ssa_p = true;
  
--- 3164,3170 ----
    calculate_dominance_info (CDI_DOMINATORS);
  
    update_ssa_p = false;
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      if (find_assert_locations (e->dest))
        update_ssa_p = true;
  
Index: loop-unswitch.c
===================================================================
-c -L loop-unswitch.c	(revision 112224) -L loop-unswitch.c	(working copy) .svn/text-base/loop-unswitch.c.svn-base loop-unswitch.c
*** loop-unswitch.c	(revision 112224)
--- loop-unswitch.c	(working copy)
*************** unswitch_loop (struct loops *loops, stru
*** 440,446 ****
  
    /* Create a block with the condition.  */
    prob = true_edge->probability;
!   switch_bb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
    seq = compare_and_jump_seq (XEXP (cond, 0), XEXP (cond, 1), GET_CODE (cond),
  			      block_label (true_edge->dest),
  			      prob, cinsn);
--- 440,446 ----
  
    /* Create a block with the condition.  */
    prob = true_edge->probability;
!   switch_bb = create_empty_bb (cfun->cfg->exit_block_ptr->prev_bb);
    seq = compare_and_jump_seq (XEXP (cond, 0), XEXP (cond, 1), GET_CODE (cond),
  			      block_label (true_edge->dest),
  			      prob, cinsn);
Index: sched-ebb.c
===================================================================
-c -L sched-ebb.c	(revision 112224) -L sched-ebb.c	(working copy) .svn/text-base/sched-ebb.c.svn-base sched-ebb.c
*** sched-ebb.c	(revision 112224)
--- sched-ebb.c	(working copy)
*************** schedule_ebbs (void)
*** 582,588 ****
  	  edge e;
  	  edge_iterator ei;
  	  tail = BB_END (bb);
! 	  if (bb->next_bb == EXIT_BLOCK_PTR
  	      || LABEL_P (BB_HEAD (bb->next_bb)))
  	    break;
  	  FOR_EACH_EDGE (e, ei, bb->succs)
--- 582,588 ----
  	  edge e;
  	  edge_iterator ei;
  	  tail = BB_END (bb);
! 	  if (bb->next_bb == cfun->cfg->exit_block_ptr
  	      || LABEL_P (BB_HEAD (bb->next_bb)))
  	    break;
  	  FOR_EACH_EDGE (e, ei, bb->succs)
*************** add_block1 (basic_block bb, basic_block 
*** 703,709 ****
    /* Recovery blocks are always bounded by BARRIERS, 
       therefore, they always form single block EBB,
       therefore, we can use rec->index to identify such EBBs.  */
!   if (after == EXIT_BLOCK_PTR)
      bitmap_set_bit (&dont_calc_deps, bb->index);
    else if (after == last_bb)
      last_bb = bb;
--- 703,709 ----
    /* Recovery blocks are always bounded by BARRIERS, 
       therefore, they always form single block EBB,
       therefore, we can use rec->index to identify such EBBs.  */
!   if (after == cfun->cfg->exit_block_ptr)
      bitmap_set_bit (&dont_calc_deps, bb->index);
    else if (after == last_bb)
      last_bb = bb;
Index: tree-into-ssa.c
===================================================================
-c -L tree-into-ssa.c	(revision 112224) -L tree-into-ssa.c	(working copy) .svn/text-base/tree-into-ssa.c.svn-base tree-into-ssa.c
*** tree-into-ssa.c	(revision 112224)
--- tree-into-ssa.c	(working copy)
*************** compute_global_livein (bitmap livein, bi
*** 337,343 ****
  	  int pred_index = pred->index;
  
  	  /* None of this is necessary for the entry block.  */
! 	  if (pred != ENTRY_BLOCK_PTR
  	      && ! bitmap_bit_p (livein, pred_index)
  	      && ! bitmap_bit_p (def_blocks, pred_index))
  	    {
--- 337,343 ----
  	  int pred_index = pred->index;
  
  	  /* None of this is necessary for the entry block.  */
! 	  if (pred != cfun->cfg->entry_block_ptr
  	      && ! bitmap_bit_p (livein, pred_index)
  	      && ! bitmap_bit_p (def_blocks, pred_index))
  	    {
*************** mark_def_site_blocks (sbitmap interestin
*** 1704,1710 ****
    init_walk_dominator_tree (&walk_data);
  
    /* Recursively walk the dominator tree.  */
!   walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
  
    /* Finalize the dominator walker.  */
    fini_walk_dominator_tree (&walk_data);
--- 1704,1710 ----
    init_walk_dominator_tree (&walk_data);
  
    /* Recursively walk the dominator tree.  */
!   walk_dominator_tree (&walk_data, cfun->cfg->entry_block_ptr);
  
    /* Finalize the dominator walker.  */
    fini_walk_dominator_tree (&walk_data);
*************** rewrite_into_ssa (void)
*** 1765,1771 ****
    insert_phi_nodes (dfs);
  
    /* 4- Rename all the blocks.  */
!   rewrite_blocks (ENTRY_BLOCK_PTR, REWRITE_ALL, interesting_blocks);
  
    /* Free allocated memory.  */
    FOR_EACH_BB (bb)
--- 1765,1771 ----
    insert_phi_nodes (dfs);
  
    /* 4- Rename all the blocks.  */
!   rewrite_blocks (cfun->cfg->entry_block_ptr, REWRITE_ALL, interesting_blocks);
  
    /* Free allocated memory.  */
    FOR_EACH_BB (bb)
*************** insert_updated_phi_nodes_for (tree var, 
*** 2438,2444 ****
  	  entry = nearest_common_dominator_for_set (CDI_DOMINATORS,
  						    db->def_blocks);
  
! 	  if (entry != ENTRY_BLOCK_PTR)
  	    EXECUTE_IF_SET_IN_BITMAP (idf, 0, i, bi)
  	      if (BASIC_BLOCK (i) != entry
  		  && dominated_by_p (CDI_DOMINATORS, BASIC_BLOCK (i), entry))
--- 2438,2444 ----
  	  entry = nearest_common_dominator_for_set (CDI_DOMINATORS,
  						    db->def_blocks);
  
! 	  if (entry != cfun->cfg->entry_block_ptr)
  	    EXECUTE_IF_SET_IN_BITMAP (idf, 0, i, bi)
  	      if (BASIC_BLOCK (i) != entry
  		  && dominated_by_p (CDI_DOMINATORS, BASIC_BLOCK (i), entry))
*************** update_ssa (unsigned update_flags)
*** 2725,2731 ****
  	 be possible to determine the nearest block that had a
  	 definition for each of the symbols that are marked for
  	 updating.  For now this seems more work than it's worth.  */
!       start_bb = ENTRY_BLOCK_PTR;
  
        /* Traverse the CFG looking for definitions and uses of symbols
  	 in SYMS_TO_RENAME.  Mark interesting blocks and statements
--- 2725,2731 ----
  	 be possible to determine the nearest block that had a
  	 definition for each of the symbols that are marked for
  	 updating.  For now this seems more work than it's worth.  */
!       start_bb = cfun->cfg->entry_block_ptr;
  
        /* Traverse the CFG looking for definitions and uses of symbols
  	 in SYMS_TO_RENAME.  Mark interesting blocks and statements
*************** update_ssa (unsigned update_flags)
*** 2782,2788 ****
        /* Insertion of PHI nodes may have added blocks to the region.
  	 We need to re-compute START_BB to include the newly added
  	 blocks.  */
!       if (start_bb != ENTRY_BLOCK_PTR)
  	start_bb = nearest_common_dominator_for_set (CDI_DOMINATORS, blocks);
      }
  
--- 2782,2788 ----
        /* Insertion of PHI nodes may have added blocks to the region.
  	 We need to re-compute START_BB to include the newly added
  	 blocks.  */
!       if (start_bb != cfun->cfg->entry_block_ptr)
  	start_bb = nearest_common_dominator_for_set (CDI_DOMINATORS, blocks);
      }
  
Index: tree-ssa-loop-im.c
===================================================================
-c -L tree-ssa-loop-im.c	(revision 112224) -L tree-ssa-loop-im.c	(working copy) .svn/text-base/tree-ssa-loop-im.c.svn-base tree-ssa-loop-im.c
*** tree-ssa-loop-im.c	(revision 112224)
--- tree-ssa-loop-im.c	(working copy)
*************** determine_invariantness (void)
*** 686,692 ****
    walk_data.before_dom_children_before_stmts = determine_invariantness_stmt;
  
    init_walk_dominator_tree (&walk_data);
!   walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
    fini_walk_dominator_tree (&walk_data);
  }
  
--- 686,692 ----
    walk_data.before_dom_children_before_stmts = determine_invariantness_stmt;
  
    init_walk_dominator_tree (&walk_data);
!   walk_dominator_tree (&walk_data, cfun->cfg->entry_block_ptr);
    fini_walk_dominator_tree (&walk_data);
  }
  
*************** move_computations (void)
*** 775,781 ****
    walk_data.before_dom_children_before_stmts = move_computations_stmt;
  
    init_walk_dominator_tree (&walk_data);
!   walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
    fini_walk_dominator_tree (&walk_data);
  
    loop_commit_inserts ();
--- 775,781 ----
    walk_data.before_dom_children_before_stmts = move_computations_stmt;
  
    init_walk_dominator_tree (&walk_data);
!   walk_dominator_tree (&walk_data, cfun->cfg->entry_block_ptr);
    fini_walk_dominator_tree (&walk_data);
  
    loop_commit_inserts ();
Index: sbitmap.c
===================================================================
-c -L sbitmap.c	(revision 112224) -L sbitmap.c	(working copy) .svn/text-base/sbitmap.c.svn-base sbitmap.c
*** sbitmap.c	(revision 112224)
--- sbitmap.c	(working copy)
*************** sbitmap_intersection_of_succs (sbitmap d
*** 538,544 ****
    for (e = NULL, ix = 0; ix < EDGE_COUNT (b->succs); ix++)
      {
        e = EDGE_SUCC (b, ix);
!       if (e->dest == EXIT_BLOCK_PTR)
  	continue;
        
        sbitmap_copy (dst, src[e->dest->index]);
--- 538,544 ----
    for (e = NULL, ix = 0; ix < EDGE_COUNT (b->succs); ix++)
      {
        e = EDGE_SUCC (b, ix);
!       if (e->dest == cfun->cfg->exit_block_ptr)
  	continue;
        
        sbitmap_copy (dst, src[e->dest->index]);
*************** sbitmap_intersection_of_succs (sbitmap d
*** 554,560 ****
  	sbitmap_ptr p, r;
  
  	e = EDGE_SUCC (b, ix);
! 	if (e->dest == EXIT_BLOCK_PTR)
  	  continue;
  
  	p = src[e->dest->index]->elms;
--- 554,560 ----
  	sbitmap_ptr p, r;
  
  	e = EDGE_SUCC (b, ix);
! 	if (e->dest == cfun->cfg->exit_block_ptr)
  	  continue;
  
  	p = src[e->dest->index]->elms;
*************** sbitmap_intersection_of_preds (sbitmap d
*** 578,584 ****
    for (e = NULL, ix = 0; ix < EDGE_COUNT (b->preds); ix++)
      {
        e = EDGE_PRED (b, ix);
!       if (e->src == ENTRY_BLOCK_PTR)
  	continue;
  
        sbitmap_copy (dst, src[e->src->index]);
--- 578,584 ----
    for (e = NULL, ix = 0; ix < EDGE_COUNT (b->preds); ix++)
      {
        e = EDGE_PRED (b, ix);
!       if (e->src == cfun->cfg->entry_block_ptr)
  	continue;
  
        sbitmap_copy (dst, src[e->src->index]);
*************** sbitmap_intersection_of_preds (sbitmap d
*** 594,600 ****
  	sbitmap_ptr p, r;
  
  	e = EDGE_PRED (b, ix);
! 	if (e->src == ENTRY_BLOCK_PTR)
  	  continue;
  
  	p = src[e->src->index]->elms;
--- 594,600 ----
  	sbitmap_ptr p, r;
  
  	e = EDGE_PRED (b, ix);
! 	if (e->src == cfun->cfg->entry_block_ptr)
  	  continue;
  
  	p = src[e->src->index]->elms;
*************** sbitmap_union_of_succs (sbitmap dst, sbi
*** 618,624 ****
    for (ix = 0; ix < EDGE_COUNT (b->succs); ix++)
      {
        e = EDGE_SUCC (b, ix);
!       if (e->dest == EXIT_BLOCK_PTR)
  	continue;
  
        sbitmap_copy (dst, src[e->dest->index]);
--- 618,624 ----
    for (ix = 0; ix < EDGE_COUNT (b->succs); ix++)
      {
        e = EDGE_SUCC (b, ix);
!       if (e->dest == cfun->cfg->exit_block_ptr)
  	continue;
  
        sbitmap_copy (dst, src[e->dest->index]);
*************** sbitmap_union_of_succs (sbitmap dst, sbi
*** 634,640 ****
  	sbitmap_ptr p, r;
  
  	e = EDGE_SUCC (b, ix);
! 	if (e->dest == EXIT_BLOCK_PTR)
  	  continue;
  
  	p = src[e->dest->index]->elms;
--- 634,640 ----
  	sbitmap_ptr p, r;
  
  	e = EDGE_SUCC (b, ix);
! 	if (e->dest == cfun->cfg->exit_block_ptr)
  	  continue;
  
  	p = src[e->dest->index]->elms;
*************** sbitmap_union_of_preds (sbitmap dst, sbi
*** 658,664 ****
    for (ix = 0; ix < EDGE_COUNT (b->preds); ix++)
      {
        e = EDGE_PRED (b, ix);
!       if (e->src== ENTRY_BLOCK_PTR)
  	continue;
  
        sbitmap_copy (dst, src[e->src->index]);
--- 658,664 ----
    for (ix = 0; ix < EDGE_COUNT (b->preds); ix++)
      {
        e = EDGE_PRED (b, ix);
!       if (e->src== cfun->cfg->entry_block_ptr)
  	continue;
  
        sbitmap_copy (dst, src[e->src->index]);
*************** sbitmap_union_of_preds (sbitmap dst, sbi
*** 674,680 ****
  	sbitmap_ptr p, r;
  
  	e = EDGE_PRED (b, ix);
! 	if (e->src == ENTRY_BLOCK_PTR)
  	  continue;
  
  	p = src[e->src->index]->elms;
--- 674,680 ----
  	sbitmap_ptr p, r;
  
  	e = EDGE_PRED (b, ix);
! 	if (e->src == cfun->cfg->entry_block_ptr)
  	  continue;
  
  	p = src[e->src->index]->elms;
Index: tree-complex.c
===================================================================
-c -L tree-complex.c	(revision 112224) -L tree-complex.c	(working copy) .svn/text-base/tree-complex.c.svn-base tree-complex.c
*** tree-complex.c	(revision 112224)
--- tree-complex.c	(working copy)
*************** update_complex_assignment (block_stmt_it
*** 639,645 ****
  static void
  update_parameter_components (void)
  {
!   edge entry_edge = single_succ_edge (ENTRY_BLOCK_PTR);
    tree parm;
  
    for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
--- 639,645 ----
  static void
  update_parameter_components (void)
  {
!   edge entry_edge = single_succ_edge (cfun->cfg->entry_block_ptr);
    tree parm;
  
    for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
Index: tree-ssa-loop-niter.c
===================================================================
-c -L tree-ssa-loop-niter.c	(revision 112224) -L tree-ssa-loop-niter.c	(working copy) .svn/text-base/tree-ssa-loop-niter.c.svn-base tree-ssa-loop-niter.c
*** tree-ssa-loop-niter.c	(revision 112224)
--- tree-ssa-loop-niter.c	(working copy)
*************** simplify_using_initial_conditions (struc
*** 881,887 ****
      return expr;
  
    for (bb = loop->header;
!        bb != ENTRY_BLOCK_PTR;
         bb = get_immediate_dominator (CDI_DOMINATORS, bb))
      {
        if (!single_pred_p (bb))
--- 881,887 ----
      return expr;
  
    for (bb = loop->header;
!        bb != cfun->cfg->entry_block_ptr;
         bb = get_immediate_dominator (CDI_DOMINATORS, bb))
      {
        if (!single_pred_p (bb))
Index: tree-pretty-print.c
===================================================================
-c -L tree-pretty-print.c	(revision 112224) -L tree-pretty-print.c	(working copy) .svn/text-base/tree-pretty-print.c.svn-base tree-pretty-print.c
*** tree-pretty-print.c	(revision 112224)
--- tree-pretty-print.c	(working copy)
*************** dump_bb_header (pretty_printer *buffer, 
*** 2667,2673 ****
  	if (flags & TDF_SLIM)
  	  {
  	    pp_string (buffer, " ");
! 	    if (e->src == ENTRY_BLOCK_PTR)
  	      pp_string (buffer, "ENTRY");
  	    else
  	      pp_decimal_int (buffer, e->src->index);
--- 2667,2673 ----
  	if (flags & TDF_SLIM)
  	  {
  	    pp_string (buffer, " ");
! 	    if (e->src == cfun->cfg->entry_block_ptr)
  	      pp_string (buffer, "ENTRY");
  	    else
  	      pp_decimal_int (buffer, e->src->index);
*************** dump_bb_end (pretty_printer *buffer, bas
*** 2708,2714 ****
      if (flags & TDF_SLIM)
        {
  	pp_string (buffer, " ");
! 	if (e->dest == EXIT_BLOCK_PTR)
  	  pp_string (buffer, "EXIT");
  	else
  	  pp_decimal_int (buffer, e->dest->index);
--- 2708,2714 ----
      if (flags & TDF_SLIM)
        {
  	pp_string (buffer, " ");
! 	if (e->dest == cfun->cfg->exit_block_ptr)
  	  pp_string (buffer, "EXIT");
  	else
  	  pp_decimal_int (buffer, e->dest->index);
Index: tracer.c
===================================================================
-c -L tracer.c	(revision 112224) -L tracer.c	(working copy) .svn/text-base/tracer.c.svn-base tracer.c
*** tracer.c	(revision 112224)
--- tracer.c	(working copy)
*************** tail_duplicate (void)
*** 322,331 ****
  static void
  layout_superblocks (void)
  {
!   basic_block end = single_succ (ENTRY_BLOCK_PTR);
    basic_block bb = end->next_bb;
  
!   while (bb != EXIT_BLOCK_PTR)
      {
        edge_iterator ei;
        edge e, best = NULL;
--- 322,331 ----
  static void
  layout_superblocks (void)
  {
!   basic_block end = single_succ (cfun->cfg->entry_block_ptr);
    basic_block bb = end->next_bb;
  
!   while (bb != cfun->cfg->exit_block_ptr)
      {
        edge_iterator ei;
        edge e, best = NULL;
*************** layout_superblocks (void)
*** 333,340 ****
  	end = end->aux;
  
        FOR_EACH_EDGE (e, ei, end->succs)
! 	if (e->dest != EXIT_BLOCK_PTR
! 	    && e->dest != single_succ (ENTRY_BLOCK_PTR)
  	    && !e->dest->il.rtl->visited
  	    && (!best || EDGE_FREQUENCY (e) > EDGE_FREQUENCY (best)))
  	  best = e;
--- 333,340 ----
  	end = end->aux;
  
        FOR_EACH_EDGE (e, ei, end->succs)
! 	if (e->dest != cfun->cfg->exit_block_ptr
! 	    && e->dest != single_succ (cfun->cfg->entry_block_ptr)
  	    && !e->dest->il.rtl->visited
  	    && (!best || EDGE_FREQUENCY (e) > EDGE_FREQUENCY (best)))
  	  best = e;
*************** layout_superblocks (void)
*** 345,351 ****
  	  best->dest->il.rtl->visited = 1;
  	}
        else
! 	for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
  	  {
  	    if (!bb->il.rtl->visited)
  	      {
--- 345,351 ----
  	  best->dest->il.rtl->visited = 1;
  	}
        else
! 	for (; bb != cfun->cfg->exit_block_ptr; bb = bb->next_bb)
  	  {
  	    if (!bb->il.rtl->visited)
  	      {
Index: tree-ssa-loop-unswitch.c
===================================================================
-c -L tree-ssa-loop-unswitch.c	(revision 112224) -L tree-ssa-loop-unswitch.c	(working copy) .svn/text-base/tree-ssa-loop-unswitch.c.svn-base tree-ssa-loop-unswitch.c
*** tree-ssa-loop-unswitch.c	(revision 112224)
--- tree-ssa-loop-unswitch.c	(working copy)
*************** simplify_using_entry_checks (struct loop
*** 166,172 ****
  	return cond;
  
        e = single_pred_edge (e->src);
!       if (e->src == ENTRY_BLOCK_PTR)
  	return cond;
      }
  }
--- 166,172 ----
  	return cond;
  
        e = single_pred_edge (e->src);
!       if (e->src == cfun->cfg->entry_block_ptr)
  	return cond;
      }
  }
Index: cfgloopmanip.c
===================================================================
-c -L cfgloopmanip.c	(revision 112224) -L cfgloopmanip.c	(working copy) .svn/text-base/cfgloopmanip.c.svn-base cfgloopmanip.c
*** cfgloopmanip.c	(revision 112224)
--- cfgloopmanip.c	(working copy)
*************** fix_bb_placement (struct loops *loops, b
*** 106,112 ****
  
    FOR_EACH_EDGE (e, ei, bb->succs)
      {
!       if (e->dest == EXIT_BLOCK_PTR)
  	continue;
  
        act = e->dest->loop_father;
--- 106,112 ----
  
    FOR_EACH_EDGE (e, ei, bb->succs)
      {
!       if (e->dest == cfun->cfg->exit_block_ptr)
  	continue;
  
        act = e->dest->loop_father;
*************** remove_path (struct loops *loops, edge e
*** 343,349 ****
        edge_iterator ei;
        bb = rem_bbs[i];
        FOR_EACH_EDGE (ae, ei, rem_bbs[i]->succs)
! 	if (ae->dest != EXIT_BLOCK_PTR && !TEST_BIT (seen, ae->dest->index))
  	  {
  	    SET_BIT (seen, ae->dest->index);
  	    bord_bbs[n_bord_bbs++] = ae->dest;
--- 343,350 ----
        edge_iterator ei;
        bb = rem_bbs[i];
        FOR_EACH_EDGE (ae, ei, rem_bbs[i]->succs)
! 	if (ae->dest != cfun->cfg->exit_block_ptr
! 	    && !TEST_BIT (seen, ae->dest->index))
  	  {
  	    SET_BIT (seen, ae->dest->index);
  	    bord_bbs[n_bord_bbs++] = ae->dest;
*************** loop_delete_branch_edge (edge e, int rea
*** 756,762 ****
  
    snd = e == EDGE_SUCC (src, 0) ? EDGE_SUCC (src, 1) : EDGE_SUCC (src, 0);
    newdest = snd->dest;
!   if (newdest == EXIT_BLOCK_PTR)
      return false;
  
    /* Hopefully the above conditions should suffice.  */
--- 757,763 ----
  
    snd = e == EDGE_SUCC (src, 0) ? EDGE_SUCC (src, 1) : EDGE_SUCC (src, 0);
    newdest = snd->dest;
!   if (newdest == cfun->cfg->exit_block_ptr)
      return false;
  
    /* Hopefully the above conditions should suffice.  */
*************** create_loop_notes (void)
*** 1322,1328 ****
  		{
  		  /* Prevent loops from overlapping.  */
  		  while (*--top != loop)
! 		    last[(*top)->num] = EXIT_BLOCK_PTR;
  
  		  /* If loop starts with jump into it, place the note in
  		     front of the jump.  */
--- 1323,1329 ----
  		{
  		  /* Prevent loops from overlapping.  */
  		  while (*--top != loop)
! 		    last[(*top)->num] = cfun->cfg->exit_block_ptr;
  
  		  /* If loop starts with jump into it, place the note in
  		     front of the jump.  */
Index: postreload-gcse.c
===================================================================
-c -L postreload-gcse.c	(revision 112224) -L postreload-gcse.c	(working copy) .svn/text-base/postreload-gcse.c.svn-base postreload-gcse.c
*** postreload-gcse.c	(revision 112224)
--- postreload-gcse.c	(working copy)
*************** eliminate_partially_redundant_loads (voi
*** 1215,1226 ****
  
    /* Note we start at block 1.  */
  
!   if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      return;
  
    FOR_BB_BETWEEN (bb,
! 		  ENTRY_BLOCK_PTR->next_bb->next_bb,
! 		  EXIT_BLOCK_PTR,
  		  next_bb)
      {
        /* Don't try anything on basic blocks with strange predecessors.  */
--- 1215,1226 ----
  
    /* Note we start at block 1.  */
  
!   if (cfun->cfg->entry_block_ptr->next_bb == cfun->cfg->exit_block_ptr)
      return;
  
    FOR_BB_BETWEEN (bb,
! 		  cfun->cfg->entry_block_ptr->next_bb->next_bb,
! 		  cfun->cfg->exit_block_ptr,
  		  next_bb)
      {
        /* Don't try anything on basic blocks with strange predecessors.  */
Index: tree-ssa-loop-manip.c
===================================================================
-c -L tree-ssa-loop-manip.c	(revision 112224) -L tree-ssa-loop-manip.c	(working copy) .svn/text-base/tree-ssa-loop-manip.c.svn-base tree-ssa-loop-manip.c
*** tree-ssa-loop-manip.c	(revision 112224)
--- tree-ssa-loop-manip.c	(working copy)
*************** get_loops_exits (void)
*** 204,210 ****
    FOR_EACH_BB (bb)
      {
        FOR_EACH_EDGE (e, ei, bb->preds)
! 	if (e->src != ENTRY_BLOCK_PTR
  	    && !flow_bb_inside_loop_p (e->src->loop_father, bb))
  	  {
  	    bitmap_set_bit (exits, bb->index);
--- 204,210 ----
    FOR_EACH_BB (bb)
      {
        FOR_EACH_EDGE (e, ei, bb->preds)
! 	if (e->src != cfun->cfg->entry_block_ptr
  	    && !flow_bb_inside_loop_p (e->src->loop_father, bb))
  	  {
  	    bitmap_set_bit (exits, bb->index);
Index: tree-tailcall.c
===================================================================
-c -L tree-tailcall.c	(revision 112224) -L tree-tailcall.c	(working copy) .svn/text-base/tree-tailcall.c.svn-base tree-tailcall.c
*** tree-tailcall.c	(revision 112224)
--- tree-tailcall.c	(working copy)
*************** eliminate_tail_call (struct tailcall *t)
*** 736,742 ****
    if (TREE_CODE (stmt) == MODIFY_EXPR)
      stmt = TREE_OPERAND (stmt, 1);
  
!   first = single_succ (ENTRY_BLOCK_PTR);
  
    /* Remove the code after call_bsi that will become unreachable.  The
       possibly unreachable code in other blocks is removed later in
--- 736,742 ----
    if (TREE_CODE (stmt) == MODIFY_EXPR)
      stmt = TREE_OPERAND (stmt, 1);
  
!   first = single_succ (cfun->cfg->entry_block_ptr);
  
    /* Remove the code after call_bsi that will become unreachable.  The
       possibly unreachable code in other blocks is removed later in
*************** eliminate_tail_call (struct tailcall *t)
*** 757,765 ****
  
    /* Number of executions of function has reduced by the tailcall.  */
    e = single_succ_edge (t->call_block);
!   decrease_profile (EXIT_BLOCK_PTR, e->count, EDGE_FREQUENCY (e));
!   decrease_profile (ENTRY_BLOCK_PTR, e->count, EDGE_FREQUENCY (e));
!   if (e->dest != EXIT_BLOCK_PTR)
      decrease_profile (e->dest, e->count, EDGE_FREQUENCY (e));
  
    /* Replace the call by a jump to the start of function.  */
--- 757,765 ----
  
    /* Number of executions of function has reduced by the tailcall.  */
    e = single_succ_edge (t->call_block);
!   decrease_profile (cfun->cfg->exit_block_ptr, e->count, EDGE_FREQUENCY (e));
!   decrease_profile (cfun->cfg->entry_block_ptr, e->count, EDGE_FREQUENCY (e));
!   if (e->dest != cfun->cfg->exit_block_ptr)
      decrease_profile (e->dest, e->count, EDGE_FREQUENCY (e));
  
    /* Replace the call by a jump to the start of function.  */
*************** tree_optimize_tail_calls_1 (bool opt_tai
*** 872,878 ****
    bool phis_constructed = false;
    struct tailcall *tailcalls = NULL, *act, *next;
    bool changed = false;
!   basic_block first = single_succ (ENTRY_BLOCK_PTR);
    tree stmt, param, ret_type, tmp, phi;
    edge_iterator ei;
  
--- 872,878 ----
    bool phis_constructed = false;
    struct tailcall *tailcalls = NULL, *act, *next;
    bool changed = false;
!   basic_block first = single_succ (cfun->cfg->entry_block_ptr);
    tree stmt, param, ret_type, tmp, phi;
    edge_iterator ei;
  
*************** tree_optimize_tail_calls_1 (bool opt_tai
*** 881,887 ****
    if (opt_tailcalls)
      opt_tailcalls = suitable_for_tail_call_opt_p ();
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      {
        /* Only traverse the normal exits, i.e. those that end with return
  	 statement.  */
--- 881,887 ----
    if (opt_tailcalls)
      opt_tailcalls = suitable_for_tail_call_opt_p ();
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      {
        /* Only traverse the normal exits, i.e. those that end with return
  	 statement.  */
*************** tree_optimize_tail_calls_1 (bool opt_tai
*** 903,909 ****
  	{
  	  /* Ensure that there is only one predecessor of the block.  */
  	  if (!single_pred_p (first))
! 	    first = split_edge (single_succ_edge (ENTRY_BLOCK_PTR));
  
  	  /* Copy the args if needed.  */
  	  for (param = DECL_ARGUMENTS (current_function_decl);
--- 903,909 ----
  	{
  	  /* Ensure that there is only one predecessor of the block.  */
  	  if (!single_pred_p (first))
! 	    first = split_edge (single_succ_edge (cfun->cfg->entry_block_ptr));
  
  	  /* Copy the args if needed.  */
  	  for (param = DECL_ARGUMENTS (current_function_decl);
*************** tree_optimize_tail_calls_1 (bool opt_tai
*** 974,980 ****
    if (a_acc || m_acc)
      {
        /* Modify the remaining return statements.  */
!       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
  	{
  	  stmt = last_stmt (e->src);
  
--- 974,980 ----
    if (a_acc || m_acc)
      {
        /* Modify the remaining return statements.  */
!       FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
  	{
  	  stmt = last_stmt (e->src);
  
Index: reload.c
===================================================================
-c -L reload.c	(revision 112224) -L reload.c	(working copy) .svn/text-base/reload.c.svn-base reload.c
*** reload.c	(revision 112224)
--- reload.c	(working copy)
*************** push_reload (rtx in, rtx out, rtx *inloc
*** 1483,1490 ****
  	    /* Check that we don't use a hardreg for an uninitialized
  	       pseudo.  See also find_dummy_reload().  */
  	    && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
! 		|| ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
! 				   ORIGINAL_REGNO (XEXP (note, 0))))
  	    && ! refers_to_regno_for_reload_p (regno,
  					       (regno
  						+ hard_regno_nregs[regno]
--- 1483,1491 ----
  	    /* Check that we don't use a hardreg for an uninitialized
  	       pseudo.  See also find_dummy_reload().  */
  	    && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
! 		|| ! bitmap_bit_p
! 		       (cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end,
! 		        ORIGINAL_REGNO (XEXP (note, 0))))
  	    && ! refers_to_regno_for_reload_p (regno,
  					       (regno
  						+ hard_regno_nregs[regno]
*************** find_dummy_reload (rtx real_in, rtx real
*** 1957,1964 ****
  	   as they would clobber the other live pseudo using the same.
  	   See also PR20973.  */
        && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
!           || ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
! 			     ORIGINAL_REGNO (in))))
      {
        unsigned int regno = REGNO (in) + in_offset;
        unsigned int nwords = hard_regno_nregs[regno][inmode];
--- 1958,1966 ----
  	   as they would clobber the other live pseudo using the same.
  	   See also PR20973.  */
        && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
!           || ! bitmap_bit_p
! 	      (cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end,
! 	       ORIGINAL_REGNO (in))))
      {
        unsigned int regno = REGNO (in) + in_offset;
        unsigned int nwords = hard_regno_nregs[regno][inmode];
Index: ipa-cp.c
===================================================================
-c -L ipa-cp.c	(revision 112224) -L ipa-cp.c	(working copy) .svn/text-base/ipa-cp.c.svn-base ipa-cp.c
*** ipa-cp.c	(revision 112224)
--- ipa-cp.c	(working copy)
*************** constant_val_insert (tree fn, tree parm1
*** 450,457 ****
    func = DECL_STRUCT_FUNCTION (fn);
    cfun = func;
    current_function_decl = fn;
!   if (ENTRY_BLOCK_PTR_FOR_FUNCTION (func)->succs)
!     FOR_EACH_EDGE (e_step, ei, ENTRY_BLOCK_PTR_FOR_FUNCTION (func)->succs)
        bsi_insert_on_edge_immediate (e_step, init_stmt);
  }
  
--- 450,457 ----
    func = DECL_STRUCT_FUNCTION (fn);
    cfun = func;
    current_function_decl = fn;
!   if (func->cfg->entry_block_ptr)
!     FOR_EACH_EDGE (e_step, ei, func->cfg->entry_block_ptr->succs)
        bsi_insert_on_edge_immediate (e_step, init_stmt);
  }
  
*************** ipcp_profile_edge_print (FILE * f)
*** 739,746 ****
        fprintf (f, "method %s: \n", cgraph_node_name (node));
        if (DECL_SAVED_TREE (node->decl))
  	{
! 	  bb =
! 	    ENTRY_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
  	  fprintf (f, "ENTRY: ");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " %d\n", (HOST_WIDE_INT) bb->count, bb->frequency);
--- 739,745 ----
        fprintf (f, "method %s: \n", cgraph_node_name (node));
        if (DECL_SAVED_TREE (node->decl))
  	{
! 	  bb = DECL_STRUCT_FUNCTION (node->decl)->cfg->entry_block_ptr;
  	  fprintf (f, "ENTRY: ");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " %d\n", (HOST_WIDE_INT) bb->count, bb->frequency);
*************** ipcp_profile_edge_print (FILE * f)
*** 749,756 ****
  	    FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e->dest ==
! 		  EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION
! 					       (node->decl)))
  		fprintf (f, "edge ENTRY -> EXIT,  Count");
  	      else
  		fprintf (f, "edge ENTRY -> %d,  Count", e->dest->index);
--- 748,754 ----
  	    FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e->dest ==
! 		  DECL_STRUCT_FUNCTION (node->decl)->cfg->exit_block_ptr)
  		fprintf (f, "edge ENTRY -> EXIT,  Count");
  	      else
  		fprintf (f, "edge ENTRY -> %d,  Count", e->dest->index);
*************** ipcp_profile_edge_print (FILE * f)
*** 766,773 ****
  	    FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e->dest ==
! 		  EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION
! 					       (node->decl)))
  		fprintf (f, "edge %d -> EXIT,  Count", e->src->index);
  	      else
  		fprintf (f, "edge %d -> %d,  Count", e->src->index,
--- 764,770 ----
  	    FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e->dest ==
! 		  DECL_STRUCT_FUNCTION (node->decl)->cfg->exit_block_ptr)
  		fprintf (f, "edge %d -> EXIT,  Count", e->src->index);
  	      else
  		fprintf (f, "edge %d -> %d,  Count", e->src->index,
*************** ipcp_profile_bb_print (FILE * f)
*** 792,799 ****
        fprintf (f, "method %s: \n", cgraph_node_name (node));
        if (DECL_SAVED_TREE (node->decl))
  	{
! 	  bb =
! 	    ENTRY_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
  	  fprintf (f, "ENTRY: Count");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " Frquency  %d\n", (HOST_WIDE_INT) bb->count,
--- 789,795 ----
        fprintf (f, "method %s: \n", cgraph_node_name (node));
        if (DECL_SAVED_TREE (node->decl))
  	{
! 	  bb = DECL_STRUCT_FUNCTION (node->decl)->cfg->entry_block_ptr;
  	  fprintf (f, "ENTRY: Count");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " Frquency  %d\n", (HOST_WIDE_INT) bb->count,
*************** ipcp_profile_bb_print (FILE * f)
*** 806,813 ****
  		     " Frequency %d\n", (HOST_WIDE_INT) bb->count,
  		     bb->frequency);
  	  }
! 	  bb =
! 	    EXIT_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (node->decl));
  	  fprintf (f, "EXIT: Count");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " Frequency %d\n", (HOST_WIDE_INT) bb->count,
--- 802,808 ----
  		     " Frequency %d\n", (HOST_WIDE_INT) bb->count,
  		     bb->frequency);
  	  }
! 	  bb = DECL_STRUCT_FUNCTION (node->decl)->cfg->exit_block_ptr;
  	  fprintf (f, "EXIT: Count");
  	  fprintf (f, " " HOST_WIDE_INT_PRINT_DEC
  		   " Frequency %d\n", (HOST_WIDE_INT) bb->count,
Index: final.c
===================================================================
-c -L final.c	(revision 112224) -L final.c	(working copy) .svn/text-base/final.c.svn-base final.c
*** final.c	(revision 112224)
--- final.c	(working copy)
*************** compute_alignments (void)
*** 734,740 ****
  	  && (branch_frequency > BB_FREQ_MAX / 10
  	      || (bb->frequency > bb->prev_bb->frequency * 10
  		  && (bb->prev_bb->frequency
! 		      <= ENTRY_BLOCK_PTR->frequency / 2))))
  	{
  	  log = JUMP_ALIGN (label);
  	  if (max_log < log)
--- 734,740 ----
  	  && (branch_frequency > BB_FREQ_MAX / 10
  	      || (bb->frequency > bb->prev_bb->frequency * 10
  		  && (bb->prev_bb->frequency
! 		      <= cfun->cfg->entry_block_ptr->frequency / 2))))
  	{
  	  log = JUMP_ALIGN (label);
  	  if (max_log < log)
Index: cfghooks.c
===================================================================
-c -L cfghooks.c	(revision 112224) -L cfghooks.c	(working copy) .svn/text-base/cfghooks.c.svn-base cfghooks.c
*** cfghooks.c	(revision 112224)
--- cfghooks.c	(working copy)
*************** verify_flow_info (void)
*** 81,90 ****
    edge_checksum = XCNEWVEC (size_t, last_basic_block);
  
    /* Check bb chain & numbers.  */
!   last_bb_seen = ENTRY_BLOCK_PTR;
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb)
      {
!       if (bb != EXIT_BLOCK_PTR
  	  && bb != BASIC_BLOCK (bb->index))
  	{
  	  error ("bb %d on wrong place", bb->index);
--- 81,90 ----
    edge_checksum = XCNEWVEC (size_t, last_basic_block);
  
    /* Check bb chain & numbers.  */
!   last_bb_seen = cfun->cfg->entry_block_ptr;
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr->next_bb, NULL, next_bb)
      {
!       if (bb != cfun->cfg->exit_block_ptr
  	  && bb != BASIC_BLOCK (bb->index))
  	{
  	  error ("bb %d on wrong place", bb->index);
*************** verify_flow_info (void)
*** 201,221 ****
      edge e;
      edge_iterator ei;
  
!     FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
        edge_checksum[e->dest->index] += (size_t) e;
  
!     FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
        edge_checksum[e->dest->index] -= (size_t) e;
    }
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      if (edge_checksum[bb->index])
        {
  	error ("basic block %i edge lists are corrupted", bb->index);
  	err = 1;
        }
  
!   last_bb_seen = ENTRY_BLOCK_PTR;
  
    /* Clean up.  */
    free (last_visited);
--- 201,221 ----
      edge e;
      edge_iterator ei;
  
!     FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
        edge_checksum[e->dest->index] += (size_t) e;
  
!     FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
        edge_checksum[e->dest->index] -= (size_t) e;
    }
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      if (edge_checksum[bb->index])
        {
  	error ("basic block %i edge lists are corrupted", bb->index);
  	err = 1;
        }
  
!   last_bb_seen = cfun->cfg->entry_block_ptr;
  
    /* Clean up.  */
    free (last_visited);
*************** tidy_fallthru_edges (void)
*** 635,644 ****
    if (!cfg_hooks->tidy_fallthru_edge)
      return;
  
!   if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      return;
  
!   FOR_BB_BETWEEN (b, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, next_bb)
      {
        edge s;
  
--- 635,645 ----
    if (!cfg_hooks->tidy_fallthru_edge)
      return;
  
!   if (cfun->cfg->entry_block_ptr->next_bb == cfun->cfg->exit_block_ptr)
      return;
  
!   FOR_BB_BETWEEN (b, cfun->cfg->entry_block_ptr->next_bb,
! 	          cfun->cfg->exit_block_ptr->prev_bb, next_bb)
      {
        edge s;
  
*************** can_duplicate_block_p (basic_block bb)
*** 678,689 ****
      internal_error ("%s does not support can_duplicate_block_p",
  		    cfg_hooks->name);
  
!   if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR)
      return false;
  
    /* Duplicating fallthru block to exit would require adding a jump
       and splitting the real last BB.  */
!   e = find_edge (bb, EXIT_BLOCK_PTR);
    if (e && (e->flags & EDGE_FALLTHRU))
      return false;
  
--- 679,690 ----
      internal_error ("%s does not support can_duplicate_block_p",
  		    cfg_hooks->name);
  
!   if (bb == cfun->cfg->exit_block_ptr || bb == cfun->cfg->entry_block_ptr)
      return false;
  
    /* Duplicating fallthru block to exit would require adding a jump
       and splitting the real last BB.  */
!   e = find_edge (bb, cfun->cfg->exit_block_ptr);
    if (e && (e->flags & EDGE_FALLTHRU))
      return false;
  
Index: cfgloopanal.c
===================================================================
-c -L cfgloopanal.c	(revision 112224) -L cfgloopanal.c	(working copy) .svn/text-base/cfgloopanal.c.svn-base cfgloopanal.c
*** cfgloopanal.c	(revision 112224)
--- cfgloopanal.c	(working copy)
*************** mark_irreducible_loops (struct loops *lo
*** 277,283 ****
    struct loop *cloop;
  
    /* Reset the flags.  */
!   FOR_BB_BETWEEN (act, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        act->flags &= ~BB_IRREDUCIBLE_LOOP;
        FOR_EACH_EDGE (e, ei, act->succs)
--- 277,283 ----
    struct loop *cloop;
  
    /* Reset the flags.  */
!   FOR_EACH_BB (act)
      {
        act->flags &= ~BB_IRREDUCIBLE_LOOP;
        FOR_EACH_EDGE (e, ei, act->succs)
*************** mark_irreducible_loops (struct loops *lo
*** 287,297 ****
    /* Create the edge lists.  */
    g = new_graph (last_basic_block + loops->num);
  
!   FOR_BB_BETWEEN (act, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      FOR_EACH_EDGE (e, ei, act->succs)
        {
          /* Ignore edges to exit.  */
!         if (e->dest == EXIT_BLOCK_PTR)
  	  continue;
  
  	/* And latch edges.  */
--- 287,297 ----
    /* Create the edge lists.  */
    g = new_graph (last_basic_block + loops->num);
  
!   FOR_EACH_BB (act)
      FOR_EACH_EDGE (e, ei, act->succs)
        {
          /* Ignore edges to exit.  */
!         if (e->dest == cfun->cfg->exit_block_ptr)
  	  continue;
  
  	/* And latch edges.  */
*************** mark_irreducible_loops (struct loops *lo
*** 333,339 ****
       run the dfs on the original graph in the order given by decreasing
       numbers assigned by the previous pass.  */
    nq = 0;
!   FOR_BB_BETWEEN (act, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        queue1[nq++] = BB_REPR (act);
      }
--- 333,339 ----
       run the dfs on the original graph in the order given by decreasing
       numbers assigned by the previous pass.  */
    nq = 0;
!   FOR_EACH_BB (act)
      {
        queue1[nq++] = BB_REPR (act);
      }
Index: omp-low.c
===================================================================
-c -L omp-low.c	(revision 112224) -L omp-low.c	(working copy) .svn/text-base/omp-low.c.svn-base omp-low.c
*** omp-low.c	(revision 112224)
--- omp-low.c	(working copy)
*************** build_omp_regions (void)
*** 3327,3333 ****
  {
    gcc_assert (omp_regions == NULL && root_omp_region == NULL);
    calculate_dominance_info (CDI_DOMINATORS);
!   build_omp_regions_1 (ENTRY_BLOCK_PTR, NULL);
  }
  
  
--- 3327,3333 ----
  {
    gcc_assert (omp_regions == NULL && root_omp_region == NULL);
    calculate_dominance_info (CDI_DOMINATORS);
!   build_omp_regions_1 (cfun->cfg->entry_block_ptr, NULL);
  }
  
  
Index: tree-ssa-dse.c
===================================================================
-c -L tree-ssa-dse.c	(revision 112224) -L tree-ssa-dse.c	(working copy) .svn/text-base/tree-ssa-dse.c.svn-base tree-ssa-dse.c
*** tree-ssa-dse.c	(revision 112224)
--- tree-ssa-dse.c	(working copy)
*************** tree_ssa_dse (void)
*** 445,451 ****
    init_walk_dominator_tree (&walk_data);
  
    /* Recursively walk the dominator tree.  */
!   walk_dominator_tree (&walk_data, EXIT_BLOCK_PTR);
  
    /* Finalize the dominator walker.  */
    fini_walk_dominator_tree (&walk_data);
--- 445,451 ----
    init_walk_dominator_tree (&walk_data);
  
    /* Recursively walk the dominator tree.  */
!   walk_dominator_tree (&walk_data, cfun->cfg->exit_block_ptr);
  
    /* Finalize the dominator walker.  */
    fini_walk_dominator_tree (&walk_data);
Index: cfg.c
===================================================================
-c -L cfg.c	(revision 112224) -L cfg.c	(working copy) .svn/text-base/cfg.c.svn-base cfg.c
*** cfg.c	(revision 112224)
--- cfg.c	(working copy)
*************** init_flow (void)
*** 84,95 ****
    if (!cfun->cfg)
      cfun->cfg = ggc_alloc_cleared (sizeof (struct control_flow_graph));
    n_edges = 0;
!   ENTRY_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def));
!   ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
!   EXIT_BLOCK_PTR = ggc_alloc_cleared (sizeof (struct basic_block_def));
!   EXIT_BLOCK_PTR->index = EXIT_BLOCK;
!   ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
!   EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
  }
  
  /* Helper function for remove_edge and clear_edges.  Frees edge structure
--- 84,97 ----
    if (!cfun->cfg)
      cfun->cfg = ggc_alloc_cleared (sizeof (struct control_flow_graph));
    n_edges = 0;
!   cfun->cfg->entry_block_ptr
!     = ggc_alloc_cleared (sizeof (struct basic_block_def));
!   cfun->cfg->entry_block_ptr->index = ENTRY_BLOCK;
!   cfun->cfg->exit_block_ptr
!     = ggc_alloc_cleared (sizeof (struct basic_block_def));
!   cfun->cfg->exit_block_ptr->index = EXIT_BLOCK;
!   cfun->cfg->entry_block_ptr->next_bb = cfun->cfg->exit_block_ptr;
!   cfun->cfg->exit_block_ptr->prev_bb = cfun->cfg->entry_block_ptr;
  }
  
  /* Helper function for remove_edge and clear_edges.  Frees edge structure
*************** clear_edges (void)
*** 111,117 ****
    edge e;
    edge_iterator ei;
  
!   FOR_EACH_BB (bb)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	free_edge (e);
--- 113,119 ----
    edge e;
    edge_iterator ei;
  
!   FOR_ALL_BB (bb)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	free_edge (e);
*************** clear_edges (void)
*** 119,128 ****
        VEC_truncate (edge, bb->preds, 0);
      }
  
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      free_edge (e);
!   VEC_truncate (edge, EXIT_BLOCK_PTR->preds, 0);
!   VEC_truncate (edge, ENTRY_BLOCK_PTR->succs, 0);
  
    gcc_assert (!n_edges);
  }
--- 121,130 ----
        VEC_truncate (edge, bb->preds, 0);
      }
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      free_edge (e);
!   VEC_truncate (edge, cfun->cfg->exit_block_ptr->preds, 0);
!   VEC_truncate (edge, cfun->cfg->entry_block_ptr->succs, 0);
  
    gcc_assert (!n_edges);
  }
*************** compact_blocks (void)
*** 164,171 ****
    int i;
    basic_block bb;
  
!   SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR);
!   SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR);
  
    i = NUM_FIXED_BLOCKS;
    FOR_EACH_BB (bb) 
--- 166,173 ----
    int i;
    basic_block bb;
  
!   SET_BASIC_BLOCK (ENTRY_BLOCK, cfun->cfg->entry_block_ptr);
!   SET_BASIC_BLOCK (EXIT_BLOCK, cfun->cfg->exit_block_ptr);
  
    i = NUM_FIXED_BLOCKS;
    FOR_EACH_BB (bb) 
*************** edge
*** 285,292 ****
  cached_make_edge (sbitmap edge_cache, basic_block src, basic_block dst, int flags)
  {
    if (edge_cache == NULL
!       || src == ENTRY_BLOCK_PTR
!       || dst == EXIT_BLOCK_PTR)
      return make_edge (src, dst, flags);
  
    /* Does the requested edge already exist?  */
--- 287,294 ----
  cached_make_edge (sbitmap edge_cache, basic_block src, basic_block dst, int flags)
  {
    if (edge_cache == NULL
!       || src == cfun->cfg->entry_block_ptr
!       || dst == cfun->cfg->exit_block_ptr)
      return make_edge (src, dst, flags);
  
    /* Does the requested edge already exist?  */
*************** clear_bb_flags (void)
*** 414,420 ****
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      bb->flags = (BB_PARTITION (bb)  | (bb->flags & BB_DISABLE_SCHEDULE)
  		 | (bb->flags & BB_RTL));
  }
--- 416,422 ----
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      bb->flags = (BB_PARTITION (bb)  | (bb->flags & BB_DISABLE_SCHEDULE)
  		 | (bb->flags & BB_RTL));
  }
*************** check_bb_profile (basic_block bb, FILE *
*** 435,441 ****
    if (profile_status == PROFILE_ABSENT)
      return;
  
!   if (bb != EXIT_BLOCK_PTR)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	sum += e->probability;
--- 437,443 ----
    if (profile_status == PROFILE_ABSENT)
      return;
  
!   if (bb != cfun->cfg->exit_block_ptr)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	sum += e->probability;
*************** check_bb_profile (basic_block bb, FILE *
*** 450,456 ****
  	fprintf (file, "Invalid sum of outgoing counts %i, should be %i\n",
  		 (int) lsum, (int) bb->count);
      }
!   if (bb != ENTRY_BLOCK_PTR)
      {
        sum = 0;
        FOR_EACH_EDGE (e, ei, bb->preds)
--- 452,458 ----
  	fprintf (file, "Invalid sum of outgoing counts %i, should be %i\n",
  		 (int) lsum, (int) bb->count);
      }
!   if (bb != cfun->cfg->entry_block_ptr)
      {
        sum = 0;
        FOR_EACH_EDGE (e, ei, bb->preds)
*************** dump_edge_info (FILE *file, edge e, int 
*** 603,611 ****
  {
    basic_block side = (do_succ ? e->dest : e->src);
  
!   if (side == ENTRY_BLOCK_PTR)
      fputs (" ENTRY", file);
!   else if (side == EXIT_BLOCK_PTR)
      fputs (" EXIT", file);
    else
      fprintf (file, " %d", side->index);
--- 605,613 ----
  {
    basic_block side = (do_succ ? e->dest : e->src);
  
!   if (side == cfun->cfg->entry_block_ptr)
      fputs (" ENTRY", file);
!   else if (side == cfun->cfg->exit_block_ptr)
      fputs (" EXIT", file);
    else
      fprintf (file, " %d", side->index);
*************** alloc_aux_for_blocks (int size)
*** 689,695 ****
      {
        basic_block bb;
  
!       FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
  	alloc_aux_for_block (bb, size);
      }
  }
--- 691,697 ----
      {
        basic_block bb;
  
!       FOR_ALL_BB (bb)
  	alloc_aux_for_block (bb, size);
      }
  }
*************** clear_aux_for_blocks (void)
*** 701,707 ****
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      bb->aux = NULL;
  }
  
--- 703,709 ----
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      bb->aux = NULL;
  }
  
*************** alloc_aux_for_edges (int size)
*** 752,758 ****
      {
        basic_block bb;
  
!       FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
  	{
  	  edge e;
  	  edge_iterator ei;
--- 754,760 ----
      {
        basic_block bb;
  
!       FOR_ALL_BB (bb)
  	{
  	  edge e;
  	  edge_iterator ei;
*************** clear_aux_for_edges (void)
*** 771,777 ****
    basic_block bb;
    edge e;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        edge_iterator ei;
        FOR_EACH_EDGE (e, ei, bb->succs)
--- 773,779 ----
    basic_block bb;
    edge e;
  
!   FOR_ALL_BB (bb)
      {
        edge_iterator ei;
        FOR_EACH_EDGE (e, ei, bb->succs)
Index: tree-ssa-uncprop.c
===================================================================
-c -L tree-ssa-uncprop.c	(revision 112224) -L tree-ssa-uncprop.c	(working copy) .svn/text-base/tree-ssa-uncprop.c.svn-base tree-ssa-uncprop.c
*** tree-ssa-uncprop.c	(revision 112224)
--- tree-ssa-uncprop.c	(working copy)
*************** tree_ssa_uncprop (void)
*** 417,423 ****
  
    /* Recursively walk the dominator tree undoing unprofitable
       constant/copy propagations.  */
!   walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
  
    /* Finalize and clean up.  */
    fini_walk_dominator_tree (&walk_data);
--- 417,423 ----
  
    /* Recursively walk the dominator tree undoing unprofitable
       constant/copy propagations.  */
!   walk_dominator_tree (&walk_data, cfun->cfg->entry_block_ptr);
  
    /* Finalize and clean up.  */
    fini_walk_dominator_tree (&walk_data);
Index: cgraphunit.c
===================================================================
-c -L cgraphunit.c	(revision 112224) -L cgraphunit.c	(working copy) .svn/text-base/cgraphunit.c.svn-base cgraphunit.c
*** cgraphunit.c	(revision 112224)
--- cgraphunit.c	(working copy)
*************** rebuild_cgraph_edges (void)
*** 627,633 ****
  
    cgraph_node_remove_callees (node);
  
!   node->count = ENTRY_BLOCK_PTR->count;
  
    FOR_EACH_BB (bb)
      for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
--- 627,633 ----
  
    cgraph_node_remove_callees (node);
  
!   node->count = cfun->cfg->entry_block_ptr->count;
  
    FOR_EACH_BB (bb)
      for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
Index: regs.h
===================================================================
-c -L regs.h	(revision 112224) -L regs.h	(working copy) .svn/text-base/regs.h.svn-base regs.h
*** regs.h	(revision 112224)
--- regs.h	(working copy)
*************** extern varray_type reg_n_info;
*** 87,93 ****
     frequency.  */
  #define REG_FREQ_FROM_BB(bb) (optimize_size				      \
  			      || (flag_branch_probabilities		      \
! 				  && !ENTRY_BLOCK_PTR->count)		      \
  			      ? REG_FREQ_MAX				      \
  			      : ((bb)->frequency * REG_FREQ_MAX / BB_FREQ_MAX)\
  			      ? ((bb)->frequency * REG_FREQ_MAX / BB_FREQ_MAX)\
--- 87,93 ----
     frequency.  */
  #define REG_FREQ_FROM_BB(bb) (optimize_size				      \
  			      || (flag_branch_probabilities		      \
! 				  && !cfun->cfg->entry_block_ptr->count)		      \
  			      ? REG_FREQ_MAX				      \
  			      : ((bb)->frequency * REG_FREQ_MAX / BB_FREQ_MAX)\
  			      ? ((bb)->frequency * REG_FREQ_MAX / BB_FREQ_MAX)\
Index: flow.c
===================================================================
-c -L flow.c	(revision 112224) -L flow.c	(working copy) .svn/text-base/flow.c.svn-base flow.c
*** flow.c	(revision 112224)
--- flow.c	(working copy)
*************** life_analysis (int flags)
*** 415,421 ****
    allocate_bb_life_data ();
  
    /* Find the set of registers live on function exit.  */
!   mark_regs_live_at_end (EXIT_BLOCK_PTR->il.rtl->global_live_at_start);
  
    /* "Update" life info from zero.  It'd be nice to begin the
       relaxation with just the exit and noreturn blocks, but that set
--- 415,422 ----
    allocate_bb_life_data ();
  
    /* Find the set of registers live on function exit.  */
!   mark_regs_live_at_end
!     (cfun->cfg->exit_block_ptr->il.rtl->global_live_at_start);
  
    /* "Update" life info from zero.  It'd be nice to begin the
       relaxation with just the exit and noreturn blocks, but that set
*************** update_life_info (sbitmap blocks, enum u
*** 694,701 ****
  	 are those that were not set anywhere in the function.  local-alloc
  	 doesn't know how to handle these correctly, so mark them as not
  	 local to any one basic block.  */
!       EXECUTE_IF_SET_IN_REG_SET (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
! 				 FIRST_PSEUDO_REGISTER, i, rsi)
  	REG_BASIC_BLOCK (i) = REG_BLOCK_GLOBAL;
  
        /* We have a problem with any pseudoreg that lives across the setjmp.
--- 695,703 ----
  	 are those that were not set anywhere in the function.  local-alloc
  	 doesn't know how to handle these correctly, so mark them as not
  	 local to any one basic block.  */
!       EXECUTE_IF_SET_IN_REG_SET
!         (cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end,
! 	 FIRST_PSEUDO_REGISTER, i, rsi)
  	REG_BASIC_BLOCK (i) = REG_BLOCK_GLOBAL;
  
        /* We have a problem with any pseudoreg that lives across the setjmp.
*************** free_basic_block_vars (void)
*** 771,780 ****
  
    label_to_block_map = NULL;
  
!   ENTRY_BLOCK_PTR->aux = NULL;
!   ENTRY_BLOCK_PTR->il.rtl->global_live_at_end = NULL;
!   EXIT_BLOCK_PTR->aux = NULL;
!   EXIT_BLOCK_PTR->il.rtl->global_live_at_start = NULL;
  }
  
  /* Delete any insns that copy a register to itself.  */
--- 773,782 ----
  
    label_to_block_map = NULL;
  
!   cfun->cfg->entry_block_ptr->aux = NULL;
!   cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end = NULL;
!   cfun->cfg->exit_block_ptr->aux = NULL;
!   cfun->cfg->exit_block_ptr->il.rtl->global_live_at_start = NULL;
  }
  
  /* Delete any insns that copy a register to itself.  */
*************** calculate_global_regs_live (sbitmap bloc
*** 1046,1052 ****
    /* Some passes used to forget clear aux field of basic block causing
       sick behavior here.  */
  #ifdef ENABLE_CHECKING
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      gcc_assert (!bb->aux);
  #endif
  
--- 1048,1054 ----
    /* Some passes used to forget clear aux field of basic block causing
       sick behavior here.  */
  #ifdef ENABLE_CHECKING
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      gcc_assert (!bb->aux);
  #endif
  
*************** calculate_global_regs_live (sbitmap bloc
*** 1096,1102 ****
    /* We clean aux when we remove the initially-enqueued bbs, but we
       don't enqueue ENTRY and EXIT initially, so clean them upfront and
       unconditionally.  */
!   ENTRY_BLOCK_PTR->aux = EXIT_BLOCK_PTR->aux = NULL;
  
    if (blocks_out)
      sbitmap_zero (blocks_out);
--- 1098,1104 ----
    /* We clean aux when we remove the initially-enqueued bbs, but we
       don't enqueue ENTRY and EXIT initially, so clean them upfront and
       unconditionally.  */
!   cfun->cfg->entry_block_ptr->aux = cfun->cfg->exit_block_ptr->aux = NULL;
  
    if (blocks_out)
      sbitmap_zero (blocks_out);
*************** calculate_global_regs_live (sbitmap bloc
*** 1166,1172 ****
        bb->aux = NULL;
  
        /* Should we start using the failure strategy?  */
!       if (bb != ENTRY_BLOCK_PTR)
  	{
  	  int max_liveness_rounds =
  	    MAX (MAX_LIVENESS_ROUNDS, cfun->max_loop_depth);
--- 1168,1174 ----
        bb->aux = NULL;
  
        /* Should we start using the failure strategy?  */
!       if (bb != cfun->cfg->entry_block_ptr)
  	{
  	  int max_liveness_rounds =
  	    MAX (MAX_LIVENESS_ROUNDS, cfun->max_loop_depth);
*************** calculate_global_regs_live (sbitmap bloc
*** 1238,1244 ****
  	    SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM);
  	}
  
!       if (bb == ENTRY_BLOCK_PTR)
  	{
  	  COPY_REG_SET (bb->il.rtl->global_live_at_end, new_live_at_end);
  	  continue;
--- 1240,1246 ----
  	    SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM);
  	}
  
!       if (bb == cfun->cfg->entry_block_ptr)
  	{
  	  COPY_REG_SET (bb->il.rtl->global_live_at_end, new_live_at_end);
  	  continue;
*************** initialize_uninitialized_subregs (void)
*** 1509,1515 ****
    find_regno_partial_param param;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      {
        basic_block bb = e->dest;
        regset map = bb->il.rtl->global_live_at_start;
--- 1511,1517 ----
    find_regno_partial_param param;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      {
        basic_block bb = e->dest;
        regset map = bb->il.rtl->global_live_at_start;
*************** allocate_bb_life_data (void)
*** 1562,1568 ****
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
        bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
--- 1564,1570 ----
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
        bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
*************** propagate_one_insn (struct propagate_blo
*** 1868,1874 ****
  	     except for return values.  */
  
  	  sibcall_p = SIBLING_CALL_P (insn);
! 	  live_at_end = EXIT_BLOCK_PTR->il.rtl->global_live_at_start;
  	  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  	    if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
  		&& ! (sibcall_p
--- 1870,1876 ----
  	     except for return values.  */
  
  	  sibcall_p = SIBLING_CALL_P (insn);
! 	  live_at_end = cfun->cfg->exit_block_ptr->il.rtl->global_live_at_start;
  	  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  	    if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
  		&& ! (sibcall_p
*************** init_propagate_block_info (basic_block b
*** 2079,2085 ****
        && (flags & PROP_SCAN_DEAD_STORES)
        && (EDGE_COUNT (bb->succs) == 0
  	  || (single_succ_p (bb)
! 	      && single_succ (bb) == EXIT_BLOCK_PTR
  	      && ! current_function_calls_eh_return)))
      {
        rtx insn, set;
--- 2081,2087 ----
        && (flags & PROP_SCAN_DEAD_STORES)
        && (EDGE_COUNT (bb->succs) == 0
  	  || (single_succ_p (bb)
! 	      && single_succ (bb) == cfun->cfg->exit_block_ptr
  	      && ! current_function_calls_eh_return)))
      {
        rtx insn, set;
*************** regno_clobbered_at_setjmp (int regno)
*** 2481,2488 ****
      return 0;
  
    return ((REG_N_SETS (regno) > 1
! 	   || REGNO_REG_SET_P (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
! 	     		       regno))
  	  && REGNO_REG_SET_P (regs_live_at_setjmp, regno));
  }
  
--- 2483,2490 ----
      return 0;
  
    return ((REG_N_SETS (regno) > 1
! 	   || REGNO_REG_SET_P
! 	        (cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end, regno))
  	  && REGNO_REG_SET_P (regs_live_at_setjmp, regno));
  }
  
Index: df-scan.c
===================================================================
-c -L df-scan.c	(revision 112224) -L df-scan.c	(working copy) .svn/text-base/df-scan.c.svn-base df-scan.c
*** df-scan.c	(revision 112224)
--- df-scan.c	(working copy)
*************** df_record_entry_block_defs (struct dataf
*** 1809,1815 ****
    EXECUTE_IF_SET_IN_BITMAP (df->entry_block_defs, 0, i, bi)
      {
        df_ref_record (dflow, regno_reg_rtx[i], &regno_reg_rtx[i], 
! 		     ENTRY_BLOCK_PTR, NULL, 
  		     DF_REF_REG_DEF, DF_REF_ARTIFICIAL , false);
      }
  }
--- 1809,1815 ----
    EXECUTE_IF_SET_IN_BITMAP (df->entry_block_defs, 0, i, bi)
      {
        df_ref_record (dflow, regno_reg_rtx[i], &regno_reg_rtx[i], 
! 		     cfun->cfg->entry_block_ptr, NULL, 
  		     DF_REF_REG_DEF, DF_REF_ARTIFICIAL , false);
      }
  }
*************** df_record_exit_block_uses (struct datafl
*** 1918,1924 ****
    if (df->flags & DF_HARD_REGS)
      EXECUTE_IF_SET_IN_BITMAP (df->exit_block_uses, 0, i, bi)
        df_uses_record (dflow, &regno_reg_rtx[i], 
!   		      DF_REF_REG_USE, EXIT_BLOCK_PTR, NULL,
  		      DF_REF_ARTIFICIAL);
  }
  
--- 1918,1924 ----
    if (df->flags & DF_HARD_REGS)
      EXECUTE_IF_SET_IN_BITMAP (df->exit_block_uses, 0, i, bi)
        df_uses_record (dflow, &regno_reg_rtx[i], 
!   		      DF_REF_REG_USE, cfun->cfg->exit_block_ptr, NULL,
  		      DF_REF_ARTIFICIAL);
  }
  
Index: haifa-sched.c
===================================================================
-c -L haifa-sched.c	(revision 112224) -L haifa-sched.c	(working copy) .svn/text-base/haifa-sched.c.svn-base haifa-sched.c
*** haifa-sched.c	(revision 112224)
--- haifa-sched.c	(working copy)
*************** priority (rtx insn)
*** 738,744 ****
  	     of each instruction in the corresponding recovery block.  */ 
  
  	  rec = RECOVERY_BLOCK (insn);
! 	  if (!rec || rec == EXIT_BLOCK_PTR)
  	    {
  	      prev_first = PREV_INSN (insn);
  	      twin = insn;
--- 738,744 ----
  	     of each instruction in the corresponding recovery block.  */ 
  
  	  rec = RECOVERY_BLOCK (insn);
! 	  if (!rec || rec == cfun->cfg->exit_block_ptr)
  	    {
  	      prev_first = PREV_INSN (insn);
  	      twin = insn;
*************** schedule_insn (rtx insn)
*** 1192,1198 ****
        resolve_dep (next, insn);
  
        if (!RECOVERY_BLOCK (insn)
! 	  || RECOVERY_BLOCK (insn) == EXIT_BLOCK_PTR)
  	{
  	  int effective_cost;      
  	  
--- 1192,1198 ----
        resolve_dep (next, insn);
  
        if (!RECOVERY_BLOCK (insn)
! 	  || RECOVERY_BLOCK (insn) == cfun->cfg->exit_block_ptr)
  	{
  	  int effective_cost;      
  	  
*************** move_insn (rtx insn)
*** 1923,1929 ****
  	  gcc_assert (!jump_p
  		      || ((current_sched_info->flags & SCHED_RGN)
  			  && RECOVERY_BLOCK (insn)
! 			  && RECOVERY_BLOCK (insn) != EXIT_BLOCK_PTR)
  		      || (current_sched_info->flags & SCHED_EBB));
  	  
  	  gcc_assert (BLOCK_FOR_INSN (PREV_INSN (insn)) == bb);
--- 1923,1929 ----
  	  gcc_assert (!jump_p
  		      || ((current_sched_info->flags & SCHED_RGN)
  			  && RECOVERY_BLOCK (insn)
! 			  && RECOVERY_BLOCK (insn) != cfun->cfg->exit_block_ptr)
  		      || (current_sched_info->flags & SCHED_EBB));
  	  
  	  gcc_assert (BLOCK_FOR_INSN (PREV_INSN (insn)) == bb);
*************** try_ready (rtx next)
*** 3051,3057 ****
    
    gcc_assert (!ORIG_PAT (next)
  	      || !RECOVERY_BLOCK (next)
! 	      || RECOVERY_BLOCK (next) == EXIT_BLOCK_PTR);
    
    if (*ts == 0 && ORIG_PAT (next) && !RECOVERY_BLOCK (next))
      /* We should change pattern of every previously speculative 
--- 3051,3057 ----
    
    gcc_assert (!ORIG_PAT (next)
  	      || !RECOVERY_BLOCK (next)
! 	      || RECOVERY_BLOCK (next) == cfun->cfg->exit_block_ptr);
    
    if (*ts == 0 && ORIG_PAT (next) && !RECOVERY_BLOCK (next))
      /* We should change pattern of every previously speculative 
*************** init_before_recovery (void)
*** 3539,3545 ****
    basic_block last;
    edge e;
  
!   last = EXIT_BLOCK_PTR->prev_bb;
    e = find_fallthru_edge (last);
  
    if (e)
--- 3539,3545 ----
    basic_block last;
    edge e;
  
!   last = cfun->cfg->exit_block_ptr->prev_bb;
    e = find_fallthru_edge (last);
  
    if (e)
*************** init_before_recovery (void)
*** 3565,3571 ****
  
        redirect_edge_succ (e, single);
        make_single_succ_edge (single, empty, 0);
!       make_single_succ_edge (empty, EXIT_BLOCK_PTR,
  			     EDGE_FALLTHRU | EDGE_CAN_FALLTHRU);
  
        label = block_label (empty);
--- 3565,3571 ----
  
        redirect_edge_succ (e, single);
        make_single_succ_edge (single, empty, 0);
!       make_single_succ_edge (empty, cfun->cfg->exit_block_ptr,
  			     EDGE_FALLTHRU | EDGE_CAN_FALLTHRU);
  
        label = block_label (empty);
*************** create_check_block_twin (rtx insn, bool 
*** 3632,3638 ****
  
    gcc_assert (ORIG_PAT (insn)
  	      && (!mutate_p 
! 		  || (RECOVERY_BLOCK (insn) == EXIT_BLOCK_PTR
  		      && !(TODO_SPEC (insn) & SPECULATIVE))));
  
    /* Create recovery block.  */
--- 3632,3638 ----
  
    gcc_assert (ORIG_PAT (insn)
  	      && (!mutate_p 
! 		  || (RECOVERY_BLOCK (insn) == cfun->cfg->exit_block_ptr
  		      && !(TODO_SPEC (insn) & SPECULATIVE))));
  
    /* Create recovery block.  */
*************** create_check_block_twin (rtx insn, bool 
*** 3643,3656 ****
      }
    else
      {
!       rec = EXIT_BLOCK_PTR;
        label = 0;
      }
  
    /* Emit CHECK.  */
    check = targetm.sched.gen_check (insn, label, mutate_p);
  
!   if (rec != EXIT_BLOCK_PTR)
      {
        /* To have mem_reg alive at the beginning of second_bb,
  	 we emit check BEFORE insn, so insn after splitting 
--- 3643,3656 ----
      }
    else
      {
!       rec = cfun->cfg->exit_block_ptr;
        label = 0;
      }
  
    /* Emit CHECK.  */
    check = targetm.sched.gen_check (insn, label, mutate_p);
  
!   if (rec != cfun->cfg->exit_block_ptr)
      {
        /* To have mem_reg alive at the beginning of second_bb,
  	 we emit check BEFORE insn, so insn after splitting 
*************** create_check_block_twin (rtx insn, bool 
*** 3675,3681 ****
  
    /* Initialize TWIN (twin is a dublicate of original instruction
       in the recovery block).  */
!   if (rec != EXIT_BLOCK_PTR)
      {
        rtx link;
  
--- 3675,3681 ----
  
    /* Initialize TWIN (twin is a dublicate of original instruction
       in the recovery block).  */
!   if (rec != cfun->cfg->exit_block_ptr)
      {
        rtx link;
  
*************** create_check_block_twin (rtx insn, bool 
*** 3707,3713 ****
  
    RESOLVED_DEPS (twin) = copy_DEPS_LIST_list (RESOLVED_DEPS (insn));  
  
!   if (rec != EXIT_BLOCK_PTR)
      /* In case of branchy check, fix CFG.  */
      {
        basic_block first_bb, second_bb;
--- 3707,3713 ----
  
    RESOLVED_DEPS (twin) = copy_DEPS_LIST_list (RESOLVED_DEPS (insn));  
  
!   if (rec != cfun->cfg->exit_block_ptr)
      /* In case of branchy check, fix CFG.  */
      {
        basic_block first_bb, second_bb;
*************** create_check_block_twin (rtx insn, bool 
*** 3763,3769 ****
        
        make_single_succ_edge (rec, second_bb, edge_flags);  
        
!       add_block (rec, EXIT_BLOCK_PTR);
      }
  
    /* Move backward dependences from INSN to CHECK and 
--- 3763,3769 ----
        
        make_single_succ_edge (rec, second_bb, edge_flags);  
        
!       add_block (rec, cfun->cfg->exit_block_ptr);
      }
  
    /* Move backward dependences from INSN to CHECK and 
*************** create_check_block_twin (rtx insn, bool 
*** 3795,3801 ****
  	  ds &= ~BEGIN_SPEC;
  	}
  
!       if (rec != EXIT_BLOCK_PTR)
  	{
  	  add_back_forw_dep (check, XEXP (link, 0), REG_NOTE_KIND (link), ds);
  	  add_back_forw_dep (twin, XEXP (link, 0), REG_NOTE_KIND (link), ds);
--- 3795,3801 ----
  	  ds &= ~BEGIN_SPEC;
  	}
  
!       if (rec != cfun->cfg->exit_block_ptr)
  	{
  	  add_back_forw_dep (check, XEXP (link, 0), REG_NOTE_KIND (link), ds);
  	  add_back_forw_dep (twin, XEXP (link, 0), REG_NOTE_KIND (link), ds);
*************** create_check_block_twin (rtx insn, bool 
*** 3841,3847 ****
    /* Future speculations: call the helper.  */
    process_insn_depend_be_in_spec (INSN_DEPEND (insn), twin, fs);
  
!   if (rec != EXIT_BLOCK_PTR)
      {
        /* Which types of dependencies should we use here is,
  	 generally, machine-dependent question...  But, for now,
--- 3841,3847 ----
    /* Future speculations: call the helper.  */
    process_insn_depend_be_in_spec (INSN_DEPEND (insn), twin, fs);
  
!   if (rec != cfun->cfg->exit_block_ptr)
      {
        /* Which types of dependencies should we use here is,
  	 generally, machine-dependent question...  But, for now,
*************** unlink_bb_notes (basic_block first, basi
*** 4058,4064 ****
    bb_header = xmalloc (last_basic_block * sizeof (*bb_header));
  
    /* Make a sentinel.  */
!   if (last->next_bb != EXIT_BLOCK_PTR)
      bb_header[last->next_bb->index] = 0;
  
    first = first->next_bb;
--- 4058,4064 ----
    bb_header = xmalloc (last_basic_block * sizeof (*bb_header));
  
    /* Make a sentinel.  */
!   if (last->next_bb != cfun->cfg->exit_block_ptr)
      bb_header[last->next_bb->index] = 0;
  
    first = first->next_bb;
*************** restore_bb_notes (basic_block first)
*** 4102,4108 ****
    first = first->next_bb;  
    /* Remember: FIRST is actually a second basic block in the ebb.  */
  
!   while (first != EXIT_BLOCK_PTR
  	 && bb_header[first->index])
      {
        rtx prev, label, note, next;
--- 4102,4108 ----
    first = first->next_bb;  
    /* Remember: FIRST is actually a second basic block in the ebb.  */
  
!   while (first != cfun->cfg->exit_block_ptr
  	 && bb_header[first->index])
      {
        rtx prev, label, note, next;
*************** extend_bb (basic_block bb)
*** 4167,4173 ****
  
    /* The following is done to keep current_sched_info->next_tail non null.  */
  
!   insn = BB_END (EXIT_BLOCK_PTR->prev_bb);
    if (NEXT_INSN (insn) == 0
        || (!NOTE_P (insn)
  	  && !LABEL_P (insn)
--- 4167,4173 ----
  
    /* The following is done to keep current_sched_info->next_tail non null.  */
  
!   insn = BB_END (cfun->cfg->exit_block_ptr->prev_bb);
    if (NEXT_INSN (insn) == 0
        || (!NOTE_P (insn)
  	  && !LABEL_P (insn)
*************** extend_bb (basic_block bb)
*** 4176,4187 ****
      {
        emit_note_after (NOTE_INSN_DELETED, insn);
        /* Make insn to appear outside BB.  */
!       BB_END (EXIT_BLOCK_PTR->prev_bb) = insn;
      }
  }
  
  /* Add a basic block BB to extended basic block EBB.
!    If EBB is EXIT_BLOCK_PTR, then BB is recovery block.
     If EBB is NULL, then BB should be a new region.  */
  void
  add_block (basic_block bb, basic_block ebb)
--- 4176,4187 ----
      {
        emit_note_after (NOTE_INSN_DELETED, insn);
        /* Make insn to appear outside BB.  */
!       BB_END (cfun->cfg->exit_block_ptr->prev_bb) = insn;
      }
  }
  
  /* Add a basic block BB to extended basic block EBB.
!    If EBB is cfun->cfg->exit_block_ptr, then BB is recovery block.
     If EBB is NULL, then BB should be a new region.  */
  void
  add_block (basic_block bb, basic_block ebb)
*************** fix_jump_move (rtx jump)
*** 4214,4220 ****
  
    gcc_assert (current_sched_info->flags & SCHED_EBB
  	      || (RECOVERY_BLOCK (jump)
! 		  && RECOVERY_BLOCK (jump) != EXIT_BLOCK_PTR));
    
    if (!NOTE_INSN_BASIC_BLOCK_P (BB_END (jump_bb_next)))
      /* if jump_bb_next is not empty.  */
--- 4214,4220 ----
  
    gcc_assert (current_sched_info->flags & SCHED_EBB
  	      || (RECOVERY_BLOCK (jump)
! 		  && RECOVERY_BLOCK (jump) != cfun->cfg->exit_block_ptr));
    
    if (!NOTE_INSN_BASIC_BLOCK_P (BB_END (jump_bb_next)))
      /* if jump_bb_next is not empty.  */
Index: dominance.c
===================================================================
-c -L dominance.c	(revision 112224) -L dominance.c	(working copy) .svn/text-base/dominance.c.svn-base dominance.c
*** dominance.c	(revision 112224)
--- dominance.c	(working copy)
*************** calc_dfs_tree_nonrec (struct dom_info *d
*** 207,213 ****
    edge_iterator *stack;
    edge_iterator ei, einext;
    int sp;
!   /* Start block (ENTRY_BLOCK_PTR for forward problem, EXIT_BLOCK for backward
       problem).  */
    basic_block en_block;
    /* Ending block.  */
--- 207,213 ----
    edge_iterator *stack;
    edge_iterator ei, einext;
    int sp;
!   /* Start block (cfun->cfg->entry_block_ptr for forward problem, EXIT_BLOCK for backward
       problem).  */
    basic_block en_block;
    /* Ending block.  */
*************** calc_dfs_tree_nonrec (struct dom_info *d
*** 220,233 ****
    if (reverse)
      {
        ei = ei_start (bb->preds);
!       en_block = EXIT_BLOCK_PTR;
!       ex_block = ENTRY_BLOCK_PTR;
      }
    else
      {
        ei = ei_start (bb->succs);
!       en_block = ENTRY_BLOCK_PTR;
!       ex_block = EXIT_BLOCK_PTR;
      }
  
    /* When the stack is empty we break out of this loop.  */
--- 220,233 ----
    if (reverse)
      {
        ei = ei_start (bb->preds);
!       en_block = cfun->cfg->exit_block_ptr;
!       ex_block = cfun->cfg->entry_block_ptr;
      }
    else
      {
        ei = ei_start (bb->succs);
!       en_block = cfun->cfg->entry_block_ptr;
!       ex_block = cfun->cfg->exit_block_ptr;
      }
  
    /* When the stack is empty we break out of this loop.  */
*************** static void
*** 313,319 ****
  calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse)
  {
    /* The first block is the ENTRY_BLOCK (or EXIT_BLOCK if REVERSE).  */
!   basic_block begin = reverse ? EXIT_BLOCK_PTR : ENTRY_BLOCK_PTR;
    di->dfs_order[last_basic_block] = di->dfsnum;
    di->dfs_to_bb[di->dfsnum] = begin;
    di->dfsnum++;
--- 313,319 ----
  calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse)
  {
    /* The first block is the ENTRY_BLOCK (or EXIT_BLOCK if REVERSE).  */
!   basic_block begin = reverse ? cfun->cfg->exit_block_ptr : cfun->cfg->entry_block_ptr;
    di->dfs_order[last_basic_block] = di->dfsnum;
    di->dfs_to_bb[di->dfsnum] = begin;
    di->dfsnum++;
*************** calc_idoms (struct dom_info *di, enum cd
*** 477,485 ****
    edge_iterator ei, einext;
  
    if (reverse)
!     en_block = EXIT_BLOCK_PTR;
    else
!     en_block = ENTRY_BLOCK_PTR;
  
    /* Go backwards in DFS order, to first look at the leafs.  */
    v = di->nodes;
--- 477,485 ----
    edge_iterator ei, einext;
  
    if (reverse)
!     en_block = cfun->cfg->exit_block_ptr;
    else
!     en_block = cfun->cfg->entry_block_ptr;
  
    /* Go backwards in DFS order, to first look at the leafs.  */
    v = di->nodes;
*************** verify_dominators (enum cdi_direction di
*** 935,941 ****
      {
        FOR_EACH_BB (bb)
  	{
! 	  if (!dominated_by_p (dir, bb, ENTRY_BLOCK_PTR))
  	    {
  	      error ("ENTRY does not dominate bb %d", bb->index);
  	      err = 1;
--- 935,941 ----
      {
        FOR_EACH_BB (bb)
  	{
! 	  if (!dominated_by_p (dir, bb, cfun->cfg->entry_block_ptr))
  	    {
  	      error ("ENTRY does not dominate bb %d", bb->index);
  	      err = 1;
*************** recount_dominator (enum cdi_direction di
*** 966,972 ****
  	{
  	  /* Ignore the predecessors that either are not reachable from
  	     the entry block, or whose dominator was not determined yet.  */
! 	  if (!dominated_by_p (dir, e->src, ENTRY_BLOCK_PTR))
  	    continue;
  
  	  if (!dominated_by_p (dir, e->src, bb))
--- 966,972 ----
  	{
  	  /* Ignore the predecessors that either are not reachable from
  	     the entry block, or whose dominator was not determined yet.  */
! 	  if (!dominated_by_p (dir, e->src, cfun->cfg->entry_block_ptr))
  	    continue;
  
  	  if (!dominated_by_p (dir, e->src, bb))
Index: tree-ssa-loop-ivopts.c
===================================================================
-c -L tree-ssa-loop-ivopts.c	(revision 112224) -L tree-ssa-loop-ivopts.c	(working copy) .svn/text-base/tree-ssa-loop-ivopts.c.svn-base tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	(revision 112224)
--- tree-ssa-loop-ivopts.c	(working copy)
*************** find_interesting_uses (struct ivopts_dat
*** 1700,1706 ****
        bb = body[i];
  
        FOR_EACH_EDGE (e, ei, bb->succs)
! 	if (e->dest != EXIT_BLOCK_PTR
  	    && !flow_bb_inside_loop_p (data->current_loop, e->dest))
  	  find_interesting_uses_outside (data, e);
  
--- 1700,1706 ----
        bb = body[i];
  
        FOR_EACH_EDGE (e, ei, bb->succs)
! 	if (e->dest != cfun->cfg->exit_block_ptr
  	    && !flow_bb_inside_loop_p (data->current_loop, e->dest))
  	  find_interesting_uses_outside (data, e);
  
Index: mode-switching.c
===================================================================
-c -L mode-switching.c	(revision 112224) -L mode-switching.c	(working copy) .svn/text-base/mode-switching.c.svn-base mode-switching.c
*** mode-switching.c	(revision 112224)
--- mode-switching.c	(working copy)
*************** create_pre_exit (int n_entities, int *en
*** 217,223 ****
       fallthrough edge; there can be at most one, but there could be
       none at all, e.g. when exit is called.  */
    pre_exit = 0;
!   FOR_EACH_EDGE (eg, ei, EXIT_BLOCK_PTR->preds)
      if (eg->flags & EDGE_FALLTHRU)
        {
  	basic_block src_bb = eg->src;
--- 217,223 ----
       fallthrough edge; there can be at most one, but there could be
       none at all, e.g. when exit is called.  */
    pre_exit = 0;
!   FOR_EACH_EDGE (eg, ei, cfun->cfg->exit_block_ptr->preds)
      if (eg->flags & EDGE_FALLTHRU)
        {
  	basic_block src_bb = eg->src;
*************** create_pre_exit (int n_entities, int *en
*** 228,234 ****
  	/* If this function returns a value at the end, we have to
  	   insert the final mode switch before the return value copy
  	   to its hard register.  */
! 	if (EDGE_COUNT (EXIT_BLOCK_PTR->preds) == 1
  	    && NONJUMP_INSN_P ((last_insn = BB_END (src_bb)))
  	    && GET_CODE (PATTERN (last_insn)) == USE
  	    && GET_CODE ((ret_reg = XEXP (PATTERN (last_insn), 0))) == REG)
--- 228,234 ----
  	/* If this function returns a value at the end, we have to
  	   insert the final mode switch before the return value copy
  	   to its hard register.  */
! 	if (EDGE_COUNT (cfun->cfg->exit_block_ptr->preds) == 1
  	    && NONJUMP_INSN_P ((last_insn = BB_END (src_bb)))
  	    && GET_CODE (PATTERN (last_insn)) == USE
  	    && GET_CODE ((ret_reg = XEXP (PATTERN (last_insn), 0))) == REG)
*************** optimize_mode_switching (void)
*** 427,433 ****
  #if defined (MODE_ENTRY) && defined (MODE_EXIT)
    /* Split the edge from the entry block, so that we can note that
       there NORMAL_MODE is supplied.  */
!   post_entry = split_edge (single_succ_edge (ENTRY_BLOCK_PTR));
    pre_exit = create_pre_exit (n_entities, entity_map, num_modes);
  #endif
  
--- 427,433 ----
  #if defined (MODE_ENTRY) && defined (MODE_EXIT)
    /* Split the edge from the entry block, so that we can note that
       there NORMAL_MODE is supplied.  */
!   post_entry = split_edge (single_succ_edge (cfun->cfg->entry_block_ptr));
    pre_exit = create_pre_exit (n_entities, entity_map, num_modes);
  #endif
  
Index: modulo-sched.c
===================================================================
-c -L modulo-sched.c	(revision 112224) -L modulo-sched.c	(working copy) .svn/text-base/modulo-sched.c.svn-base modulo-sched.c
*** modulo-sched.c	(revision 112224)
--- modulo-sched.c	(working copy)
*************** canon_loop (struct loop *loop)
*** 877,883 ****
  
    /* Avoid annoying special cases of edges going to exit
       block.  */
!   FOR_EACH_EDGE (e, i, EXIT_BLOCK_PTR->preds)
      if ((e->flags & EDGE_FALLTHRU) && (EDGE_COUNT (e->src->succs) > 1))
        loop_split_edge_with (e, NULL_RTX);
  
--- 877,883 ----
  
    /* Avoid annoying special cases of edges going to exit
       block.  */
!   FOR_EACH_EDGE (e, i, cfun->cfg->exit_block_ptr->preds)
      if ((e->flags & EDGE_FALLTHRU) && (EDGE_COUNT (e->src->succs) > 1))
        loop_split_edge_with (e, NULL_RTX);
  
*************** rest_of_handle_sms (void)
*** 2525,2531 ****
  
    /* Finalize layout changes.  */
    FOR_EACH_BB (bb)
!     if (bb->next_bb != EXIT_BLOCK_PTR)
        bb->aux = bb->next_bb;
    cfg_layout_finalize ();
    free_dominance_info (CDI_DOMINATORS);
--- 2525,2531 ----
  
    /* Finalize layout changes.  */
    FOR_EACH_BB (bb)
!     if (bb->next_bb != cfun->cfg->exit_block_ptr)
        bb->aux = bb->next_bb;
    cfg_layout_finalize ();
    free_dominance_info (CDI_DOMINATORS);
Index: graph.c
===================================================================
-c -L graph.c	(revision 112224) -L graph.c	(working copy) .svn/text-base/graph.c.svn-base graph.c
*** graph.c	(revision 112224)
--- graph.c	(working copy)
*************** print_rtl_graph_with_bb (const char *bas
*** 322,328 ****
  		 basic block.  */
  	      FOR_EACH_EDGE (e, ei, bb->succs)
  		{
! 		  if (e->dest != EXIT_BLOCK_PTR)
  		    {
  		      rtx block_head = BB_HEAD (e->dest);
  
--- 322,328 ----
  		 basic block.  */
  	      FOR_EACH_EDGE (e, ei, bb->succs)
  		{
! 		  if (e->dest != cfun->cfg->exit_block_ptr)
  		    {
  		      rtx block_head = BB_HEAD (e->dest);
  
Index: cse.c
===================================================================
-c -L cse.c	(revision 112224) -L cse.c	(working copy) .svn/text-base/cse.c.svn-base cse.c
*** cse.c	(revision 112224)
--- cse.c	(working copy)
*************** cse_cc_succs (basic_block bb, rtx cc_reg
*** 7575,7581 ****
  	continue;
  
        if (EDGE_COUNT (e->dest->preds) != 1
! 	  || e->dest == EXIT_BLOCK_PTR)
  	continue;
  
        end = NEXT_INSN (BB_END (e->dest));
--- 7575,7581 ----
  	continue;
  
        if (EDGE_COUNT (e->dest->preds) != 1
! 	  || e->dest == cfun->cfg->exit_block_ptr)
  	continue;
  
        end = NEXT_INSN (BB_END (e->dest));
Index: tree-stdarg.c
===================================================================
-c -L tree-stdarg.c	(revision 112224) -L tree-stdarg.c	(working copy) .svn/text-base/tree-stdarg.c.svn-base tree-stdarg.c
*** tree-stdarg.c	(revision 112224)
--- tree-stdarg.c	(working copy)
*************** reachable_at_most_once (basic_block va_a
*** 93,99 ****
  	  break;
  	}
  
!       gcc_assert (src != ENTRY_BLOCK_PTR);
  
        if (! TEST_BIT (visited, src->index))
  	{
--- 93,99 ----
  	  break;
  	}
  
!       gcc_assert (src != cfun->cfg->entry_block_ptr);
  
        if (! TEST_BIT (visited, src->index))
  	{
Index: tree-ssa-math-opts.c
===================================================================
-c -L tree-ssa-math-opts.c	(revision 112224) -L tree-ssa-math-opts.c	(working copy) .svn/text-base/tree-ssa-math-opts.c.svn-base tree-ssa-math-opts.c
*** tree-ssa-math-opts.c	(revision 112224)
--- tree-ssa-math-opts.c	(working copy)
*************** register_division_in (basic_block bb)
*** 236,242 ****
    if (!occ)
      {
        occ = occ_new (bb, NULL);
!       insert_bb (occ, ENTRY_BLOCK_PTR, &occ_head);
      }
  
    occ->bb_has_division = true;
--- 236,242 ----
    if (!occ)
      {
        occ = occ_new (bb, NULL);
!       insert_bb (occ, cfun->cfg->entry_block_ptr, &occ_head);
      }
  
    occ->bb_has_division = true;
Index: tree-ssa-dom.c
===================================================================
-c -L tree-ssa-dom.c	(revision 112224) -L tree-ssa-dom.c	(working copy) .svn/text-base/tree-ssa-dom.c.svn-base tree-ssa-dom.c
*** tree-ssa-dom.c	(revision 112224)
--- tree-ssa-dom.c	(working copy)
*************** tree_ssa_dominator_optimize (void)
*** 290,296 ****
    mark_dfs_back_edges ();
  
    /* Recursively walk the dominator tree optimizing statements.  */
!   walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
  
    {
      block_stmt_iterator bsi;
--- 290,296 ----
    mark_dfs_back_edges ();
  
    /* Recursively walk the dominator tree optimizing statements.  */
!   walk_dominator_tree (&walk_data, cfun->cfg->entry_block_ptr);
  
    {
      block_stmt_iterator bsi;
Index: tree-ssa-propagate.c
===================================================================
-c -L tree-ssa-propagate.c	(revision 112224) -L tree-ssa-propagate.c	(working copy) .svn/text-base/tree-ssa-propagate.c.svn-base tree-ssa-propagate.c
*** tree-ssa-propagate.c	(revision 112224)
--- tree-ssa-propagate.c	(working copy)
*************** cfg_blocks_empty_p (void)
*** 176,182 ****
  static void 
  cfg_blocks_add (basic_block bb)
  {
!   gcc_assert (bb != ENTRY_BLOCK_PTR && bb != EXIT_BLOCK_PTR);
    gcc_assert (!TEST_BIT (bb_in_list, bb->index));
  
    if (cfg_blocks_empty_p ())
--- 176,182 ----
  static void 
  cfg_blocks_add (basic_block bb)
  {
!   gcc_assert (bb != cfun->cfg->entry_block_ptr && bb != cfun->cfg->exit_block_ptr);
    gcc_assert (!TEST_BIT (bb_in_list, bb->index));
  
    if (cfg_blocks_empty_p ())
*************** static void
*** 262,268 ****
  add_control_edge (edge e)
  {
    basic_block bb = e->dest;
!   if (bb == EXIT_BLOCK_PTR)
      return;
  
    /* If the edge had already been executed, skip it.  */
--- 262,268 ----
  add_control_edge (edge e)
  {
    basic_block bb = e->dest;
!   if (bb == cfun->cfg->exit_block_ptr)
      return;
  
    /* If the edge had already been executed, skip it.  */
*************** simulate_block (basic_block block)
*** 391,397 ****
    tree phi;
  
    /* There is nothing to do for the exit block.  */
!   if (block == EXIT_BLOCK_PTR)
      return;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
--- 391,397 ----
    tree phi;
  
    /* There is nothing to do for the exit block.  */
!   if (block == cfun->cfg->exit_block_ptr)
      return;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
*************** ssa_prop_init (void)
*** 487,493 ****
        SSA_NAME_VALUE (ssa_name (i)) = NULL_TREE;
  
    /* Initially assume that every edge in the CFG is not executable.
!      (including the edges coming out of ENTRY_BLOCK_PTR).  */
    FOR_ALL_BB (bb)
      {
        block_stmt_iterator si;
--- 487,493 ----
        SSA_NAME_VALUE (ssa_name (i)) = NULL_TREE;
  
    /* Initially assume that every edge in the CFG is not executable.
!      (including the edges coming out of cfun->cfg->entry_block_ptr).  */
    FOR_ALL_BB (bb)
      {
        block_stmt_iterator si;
*************** ssa_prop_init (void)
*** 501,507 ****
  
    /* Seed the algorithm by adding the successors of the entry block to the
       edge worklist.  */
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      add_control_edge (e);
  }
  
--- 501,507 ----
  
    /* Seed the algorithm by adding the successors of the entry block to the
       edge worklist.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      add_control_edge (e);
  }
  
Index: loop-init.c
===================================================================
-c -L loop-init.c	(revision 112224) -L loop-init.c	(working copy) .svn/text-base/loop-init.c.svn-base loop-init.c
*** loop-init.c	(revision 112224)
--- loop-init.c	(working copy)
*************** loop_optimizer_init (unsigned flags)
*** 54,60 ****
    /* Avoid annoying special cases of edges going to exit
       block.  */
  
!   for (ei = ei_start (EXIT_BLOCK_PTR->preds); (e = ei_safe_edge (ei)); )
      if ((e->flags & EDGE_FALLTHRU) && !single_succ_p (e->src))
        split_edge (e);
      else
--- 54,60 ----
    /* Avoid annoying special cases of edges going to exit
       block.  */
  
!   for (ei = ei_start (cfun->cfg->exit_block_ptr->preds); (e = ei_safe_edge (ei)); )
      if ((e->flags & EDGE_FALLTHRU) && !single_succ_p (e->src))
        split_edge (e);
      else
*************** rtl_loop_done (void)
*** 208,214 ****
  
    /* Finalize layout changes.  */
    FOR_EACH_BB (bb)
!     if (bb->next_bb != EXIT_BLOCK_PTR)
        bb->aux = bb->next_bb;
    cfg_layout_finalize ();
  
--- 208,214 ----
  
    /* Finalize layout changes.  */
    FOR_EACH_BB (bb)
!     if (bb->next_bb != cfun->cfg->exit_block_ptr)
        bb->aux = bb->next_bb;
    cfg_layout_finalize ();
  
Index: tree-ssa-sink.c
===================================================================
-c -L tree-ssa-sink.c	(revision 112224) -L tree-ssa-sink.c	(working copy) .svn/text-base/tree-ssa-sink.c.svn-base tree-ssa-sink.c
*** tree-ssa-sink.c	(revision 112224)
--- tree-ssa-sink.c	(working copy)
*************** nearest_common_dominator_of_uses (tree s
*** 244,250 ****
  	    }
  
  	  /* Short circuit. Nothing dominates the entry block.  */
! 	  if (useblock == ENTRY_BLOCK_PTR)
  	    {
  	      BITMAP_FREE (blocks);
  	      return NULL;
--- 244,250 ----
  	    }
  
  	  /* Short circuit. Nothing dominates the entry block.  */
! 	  if (useblock == cfun->cfg->entry_block_ptr)
  	    {
  	      BITMAP_FREE (blocks);
  	      return NULL;
*************** execute_sink_code (void)
*** 527,533 ****
    connect_infinite_loops_to_exit ();
    memset (&sink_stats, 0, sizeof (sink_stats));
    calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
!   sink_code_in_bb (EXIT_BLOCK_PTR); 
    if (dump_file && (dump_flags & TDF_STATS))
      fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
    free_dominance_info (CDI_POST_DOMINATORS);
--- 527,533 ----
    connect_infinite_loops_to_exit ();
    memset (&sink_stats, 0, sizeof (sink_stats));
    calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
!   sink_code_in_bb (cfun->cfg->exit_block_ptr); 
    if (dump_file && (dump_flags & TDF_STATS))
      fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
    free_dominance_info (CDI_POST_DOMINATORS);
Index: cfganal.c
===================================================================
-c -L cfganal.c	(revision 112224) -L cfganal.c	(working copy) .svn/text-base/cfganal.c.svn-base cfganal.c
*** cfganal.c	(revision 112224)
--- cfganal.c	(working copy)
*************** forwarder_block_p (basic_block bb)
*** 86,92 ****
  {
    rtx insn;
  
!   if (bb == EXIT_BLOCK_PTR || bb == ENTRY_BLOCK_PTR
        || !single_succ_p (bb))
      return false;
  
--- 86,92 ----
  {
    rtx insn;
  
!   if (bb == cfun->cfg->exit_block_ptr || bb == cfun->cfg->entry_block_ptr
        || !single_succ_p (bb))
      return false;
  
*************** can_fallthru (basic_block src, basic_blo
*** 109,120 ****
    edge e;
    edge_iterator ei;
  
!   if (target == EXIT_BLOCK_PTR)
      return true;
    if (src->next_bb != target)
      return 0;
    FOR_EACH_EDGE (e, ei, src->succs)
!     if (e->dest == EXIT_BLOCK_PTR
  	&& e->flags & EDGE_FALLTHRU)
        return 0;
  
--- 109,120 ----
    edge e;
    edge_iterator ei;
  
!   if (target == cfun->cfg->exit_block_ptr)
      return true;
    if (src->next_bb != target)
      return 0;
    FOR_EACH_EDGE (e, ei, src->succs)
!     if (e->dest == cfun->cfg->exit_block_ptr
  	&& e->flags & EDGE_FALLTHRU)
        return 0;
  
*************** could_fall_through (basic_block src, bas
*** 135,144 ****
    edge e;
    edge_iterator ei;
  
!   if (target == EXIT_BLOCK_PTR)
      return true;
    FOR_EACH_EDGE (e, ei, src->succs)
!     if (e->dest == EXIT_BLOCK_PTR
  	&& e->flags & EDGE_FALLTHRU)
        return 0;
    return true;
--- 135,144 ----
    edge e;
    edge_iterator ei;
  
!   if (target == cfun->cfg->exit_block_ptr)
      return true;
    FOR_EACH_EDGE (e, ei, src->succs)
!     if (e->dest == cfun->cfg->exit_block_ptr
  	&& e->flags & EDGE_FALLTHRU)
        return 0;
    return true;
*************** mark_dfs_back_edges (void)
*** 181,187 ****
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (ENTRY_BLOCK_PTR->succs);
  
    while (sp)
      {
--- 181,187 ----
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (cfun->cfg->entry_block_ptr->succs);
  
    while (sp)
      {
*************** mark_dfs_back_edges (void)
*** 196,202 ****
        ei_edge (ei)->flags &= ~EDGE_DFS_BACK;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
--- 196,202 ----
        ei_edge (ei)->flags &= ~EDGE_DFS_BACK;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != cfun->cfg->exit_block_ptr && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
*************** mark_dfs_back_edges (void)
*** 213,224 ****
  	}
        else
  	{
! 	  if (dest != EXIT_BLOCK_PTR && src != ENTRY_BLOCK_PTR
  	      && pre[src->index] >= pre[dest->index]
  	      && post[dest->index] == 0)
  	    ei_edge (ei)->flags |= EDGE_DFS_BACK, found = true;
  
! 	  if (ei_one_before_end_p (ei) && src != ENTRY_BLOCK_PTR)
  	    post[src->index] = postnum++;
  
  	  if (!ei_one_before_end_p (ei))
--- 213,224 ----
  	}
        else
  	{
! 	  if (dest != cfun->cfg->exit_block_ptr && src != cfun->cfg->entry_block_ptr
  	      && pre[src->index] >= pre[dest->index]
  	      && post[dest->index] == 0)
  	    ei_edge (ei)->flags |= EDGE_DFS_BACK, found = true;
  
! 	  if (ei_one_before_end_p (ei) && src != cfun->cfg->entry_block_ptr)
  	    post[src->index] = postnum++;
  
  	  if (!ei_one_before_end_p (ei))
*************** find_unreachable_blocks (void)
*** 293,299 ****
       be only one.  It isn't inconceivable that we might one day directly
       support Fortran alternate entry points.  */
  
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      {
        *tos++ = e->dest;
  
--- 293,299 ----
       be only one.  It isn't inconceivable that we might one day directly
       support Fortran alternate entry points.  */
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      {
        *tos++ = e->dest;
  
*************** create_edge_list (void)
*** 351,357 ****
  
    /* Determine the number of edges in the flow graph by counting successor
       edges on each basic block.  */
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        num_edges += EDGE_COUNT (bb->succs);
      }
--- 351,357 ----
  
    /* Determine the number of edges in the flow graph by counting successor
       edges on each basic block.  */
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
      {
        num_edges += EDGE_COUNT (bb->succs);
      }
*************** create_edge_list (void)
*** 364,370 ****
    num_edges = 0;
  
    /* Follow successors of blocks, and register these edges.  */
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
        elist->index_to_edge[num_edges++] = e;
  
--- 364,370 ----
    num_edges = 0;
  
    /* Follow successors of blocks, and register these edges.  */
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
        elist->index_to_edge[num_edges++] = e;
  
*************** print_edge_list (FILE *f, struct edge_li
*** 396,407 ****
    for (x = 0; x < elist->num_edges; x++)
      {
        fprintf (f, " %-4d - edge(", x);
!       if (INDEX_EDGE_PRED_BB (elist, x) == ENTRY_BLOCK_PTR)
  	fprintf (f, "entry,");
        else
  	fprintf (f, "%d,", INDEX_EDGE_PRED_BB (elist, x)->index);
  
!       if (INDEX_EDGE_SUCC_BB (elist, x) == EXIT_BLOCK_PTR)
  	fprintf (f, "exit)\n");
        else
  	fprintf (f, "%d)\n", INDEX_EDGE_SUCC_BB (elist, x)->index);
--- 396,407 ----
    for (x = 0; x < elist->num_edges; x++)
      {
        fprintf (f, " %-4d - edge(", x);
!       if (INDEX_EDGE_PRED_BB (elist, x) == cfun->cfg->entry_block_ptr)
  	fprintf (f, "entry,");
        else
  	fprintf (f, "%d,", INDEX_EDGE_PRED_BB (elist, x)->index);
  
!       if (INDEX_EDGE_SUCC_BB (elist, x) == cfun->cfg->exit_block_ptr)
  	fprintf (f, "exit)\n");
        else
  	fprintf (f, "%d)\n", INDEX_EDGE_SUCC_BB (elist, x)->index);
*************** verify_edge_list (FILE *f, struct edge_l
*** 420,426 ****
    basic_block bb, p, s;
    edge_iterator ei;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
--- 420,426 ----
    basic_block bb, p, s;
    edge_iterator ei;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
      {
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
*************** verify_edge_list (FILE *f, struct edge_l
*** 445,452 ****
    /* We've verified that all the edges are in the list, now lets make sure
       there are no spurious edges in the list.  */
  
!   FOR_BB_BETWEEN (p, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
!     FOR_BB_BETWEEN (s, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb)
        {
  	int found_edge = 0;
  
--- 445,452 ----
    /* We've verified that all the edges are in the list, now lets make sure
       there are no spurious edges in the list.  */
  
!   FOR_BB_BETWEEN (p, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
!     FOR_BB_BETWEEN (s, cfun->cfg->entry_block_ptr->next_bb, NULL, next_bb)
        {
  	int found_edge = 0;
  
*************** remove_fake_edges (void)
*** 580,586 ****
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb, NULL, next_bb)
      remove_fake_predecessors (bb);
  }
  
--- 580,586 ----
  {
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr->next_bb, NULL, next_bb)
      remove_fake_predecessors (bb);
  }
  
*************** remove_fake_edges (void)
*** 589,595 ****
  void
  remove_fake_exit_edges (void)
  {
!   remove_fake_predecessors (EXIT_BLOCK_PTR);
  }
  
  
--- 589,595 ----
  void
  remove_fake_exit_edges (void)
  {
!   remove_fake_predecessors (cfun->cfg->exit_block_ptr);
  }
  
  
*************** add_noreturn_fake_exit_edges (void)
*** 604,610 ****
  
    FOR_EACH_BB (bb)
      if (EDGE_COUNT (bb->succs) == 0)
!       make_single_succ_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  }
  
  /* This function adds a fake edge between any infinite loops to the
--- 604,610 ----
  
    FOR_EACH_BB (bb)
      if (EDGE_COUNT (bb->succs) == 0)
!       make_single_succ_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  }
  
  /* This function adds a fake edge between any infinite loops to the
*************** add_noreturn_fake_exit_edges (void)
*** 621,633 ****
  void
  connect_infinite_loops_to_exit (void)
  {
!   basic_block unvisited_block = EXIT_BLOCK_PTR;
    struct depth_first_search_dsS dfs_ds;
  
    /* Perform depth-first search in the reverse graph to find nodes
       reachable from the exit block.  */
    flow_dfs_compute_reverse_init (&dfs_ds);
!   flow_dfs_compute_reverse_add_bb (&dfs_ds, EXIT_BLOCK_PTR);
  
    /* Repeatedly add fake edges, updating the unreachable nodes.  */
    while (1)
--- 621,633 ----
  void
  connect_infinite_loops_to_exit (void)
  {
!   basic_block unvisited_block = cfun->cfg->exit_block_ptr;
    struct depth_first_search_dsS dfs_ds;
  
    /* Perform depth-first search in the reverse graph to find nodes
       reachable from the exit block.  */
    flow_dfs_compute_reverse_init (&dfs_ds);
!   flow_dfs_compute_reverse_add_bb (&dfs_ds, cfun->cfg->exit_block_ptr);
  
    /* Repeatedly add fake edges, updating the unreachable nodes.  */
    while (1)
*************** connect_infinite_loops_to_exit (void)
*** 637,643 ****
        if (!unvisited_block)
  	break;
  
!       make_edge (unvisited_block, EXIT_BLOCK_PTR, EDGE_FAKE);
        flow_dfs_compute_reverse_add_bb (&dfs_ds, unvisited_block);
      }
  
--- 637,643 ----
        if (!unvisited_block)
  	break;
  
!       make_edge (unvisited_block, cfun->cfg->exit_block_ptr, EDGE_FAKE);
        flow_dfs_compute_reverse_add_bb (&dfs_ds, unvisited_block);
      }
  
*************** post_order_compute (int *post_order, boo
*** 670,676 ****
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (ENTRY_BLOCK_PTR->succs);
  
    while (sp)
      {
--- 670,676 ----
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (cfun->cfg->entry_block_ptr->succs);
  
    while (sp)
      {
*************** post_order_compute (int *post_order, boo
*** 684,690 ****
        dest = ei_edge (ei)->dest;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
--- 684,690 ----
        dest = ei_edge (ei)->dest;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != cfun->cfg->exit_block_ptr && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
*************** post_order_compute (int *post_order, boo
*** 698,704 ****
  	}
        else
  	{
! 	  if (ei_one_before_end_p (ei) && src != ENTRY_BLOCK_PTR)
  	   post_order[post_order_num++] = src->index;
  
  	  if (!ei_one_before_end_p (ei))
--- 698,704 ----
  	}
        else
  	{
! 	  if (ei_one_before_end_p (ei) && src != cfun->cfg->entry_block_ptr)
  	   post_order[post_order_num++] = src->index;
  
  	  if (!ei_one_before_end_p (ei))
*************** pre_and_rev_post_order_compute (int *pre
*** 759,765 ****
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (ENTRY_BLOCK_PTR->succs);
  
    while (sp)
      {
--- 759,765 ----
    sbitmap_zero (visited);
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (cfun->cfg->entry_block_ptr->succs);
  
    while (sp)
      {
*************** pre_and_rev_post_order_compute (int *pre
*** 773,779 ****
        dest = ei_edge (ei)->dest;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
--- 773,779 ----
        dest = ei_edge (ei)->dest;
  
        /* Check if the edge destination has been visited yet.  */
!       if (dest != cfun->cfg->exit_block_ptr && ! TEST_BIT (visited, dest->index))
  	{
  	  /* Mark that we have visited the destination.  */
  	  SET_BIT (visited, dest->index);
*************** pre_and_rev_post_order_compute (int *pre
*** 794,800 ****
  	}
        else
  	{
! 	  if (ei_one_before_end_p (ei) && src != ENTRY_BLOCK_PTR
  	      && rev_post_order)
  	    /* There are no more successors for the SRC node
  	       so assign its reverse completion number.  */
--- 794,800 ----
  	}
        else
  	{
! 	  if (ei_one_before_end_p (ei) && src != cfun->cfg->entry_block_ptr
  	      && rev_post_order)
  	    /* There are no more successors for the SRC node
  	       so assign its reverse completion number.  */
*************** compute_dominance_frontiers_1 (bitmap *f
*** 1048,1054 ****
  	    {
  	      basic_block runner = p->src;
  	      basic_block domsb;
! 	      if (runner == ENTRY_BLOCK_PTR)
  		continue;
  	      
  	      domsb = get_immediate_dominator (CDI_DOMINATORS, b);
--- 1048,1054 ----
  	    {
  	      basic_block runner = p->src;
  	      basic_block domsb;
! 	      if (runner == cfun->cfg->entry_block_ptr)
  		continue;
  	      
  	      domsb = get_immediate_dominator (CDI_DOMINATORS, b);
Index: global.c
===================================================================
-c -L global.c	(revision 112224) -L global.c	(working copy) .svn/text-base/global.c.svn-base global.c
*** global.c	(revision 112224)
--- global.c	(working copy)
*************** build_insn_chain (rtx first)
*** 1827,1833 ****
  {
    struct insn_chain **p = &reload_insn_chain;
    struct insn_chain *prev = 0;
!   basic_block b = ENTRY_BLOCK_PTR->next_bb;
  
    live_relevant_regs = ALLOC_REG_SET (&reg_obstack);
  
--- 1827,1833 ----
  {
    struct insn_chain **p = &reload_insn_chain;
    struct insn_chain *prev = 0;
!   basic_block b = cfun->cfg->entry_block_ptr->next_bb;
  
    live_relevant_regs = ALLOC_REG_SET (&reg_obstack);
  
*************** build_insn_chain (rtx first)
*** 1906,1912 ****
  	 We may want to reorganize the loop somewhat since this test should
  	 always be the right exit test.  Allow an ADDR_VEC or ADDR_DIF_VEC if
  	 the previous real insn is a JUMP_INSN.  */
!       if (b == EXIT_BLOCK_PTR)
  	{
  #ifdef ENABLE_CHECKING
  	  for (first = NEXT_INSN (first); first; first = NEXT_INSN (first))
--- 1906,1912 ----
  	 We may want to reorganize the loop somewhat since this test should
  	 always be the right exit test.  Allow an ADDR_VEC or ADDR_DIF_VEC if
  	 the previous real insn is a JUMP_INSN.  */
!       if (b == cfun->cfg->exit_block_ptr)
  	{
  #ifdef ENABLE_CHECKING
  	  for (first = NEXT_INSN (first); first; first = NEXT_INSN (first))
Index: ifcvt.c
===================================================================
-c -L ifcvt.c	(revision 112224) -L ifcvt.c	(working copy) .svn/text-base/ifcvt.c.svn-base ifcvt.c
*** ifcvt.c	(revision 112224)
--- ifcvt.c	(working copy)
*************** merge_if_block (struct ce_if_block * ce_
*** 2701,2707 ****
        /* 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)
--- 2701,2707 ----
        /* 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 == cfun->cfg->exit_block_ptr
  			&& CALL_P (last)
  			&& SIBLING_CALL_P (last))
  		    || ((EDGE_SUCC (combo_bb, 0)->flags & EDGE_EH)
*************** merge_if_block (struct ce_if_block * ce_
*** 2715,2721 ****
       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)
      {
        /* We can merge the JOIN.  */
        if (combo_bb->il.rtl->global_live_at_end)
--- 2715,2721 ----
       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 != cfun->cfg->exit_block_ptr)
      {
        /* We can merge the JOIN.  */
        if (combo_bb->il.rtl->global_live_at_end)
*************** merge_if_block (struct ce_if_block * ce_
*** 2735,2741 ****
  		  && single_succ (combo_bb) == join_bb);
  
        /* Remove the jump and cruft from the end of the COMBO block.  */
!       if (join_bb != EXIT_BLOCK_PTR)
  	tidy_fallthru_edge (single_succ_edge (combo_bb));
      }
  
--- 2735,2741 ----
  		  && single_succ (combo_bb) == join_bb);
  
        /* Remove the jump and cruft from the end of the COMBO block.  */
!       if (join_bb != cfun->cfg->exit_block_ptr)
  	tidy_fallthru_edge (single_succ_edge (combo_bb));
      }
  
*************** find_if_block (struct ce_if_block * ce_i
*** 3085,3091 ****
    next = then_bb;
    if (else_bb && (next = next->next_bb) != else_bb)
      return FALSE;
!   if ((next = next->next_bb) != join_bb && join_bb != EXIT_BLOCK_PTR)
      {
        if (else_bb)
  	join_bb = NULL;
--- 3085,3091 ----
    next = then_bb;
    if (else_bb && (next = next->next_bb) != else_bb)
      return FALSE;
!   if ((next = next->next_bb) != join_bb && join_bb != cfun->cfg->exit_block_ptr)
      {
        if (else_bb)
  	join_bb = NULL;
*************** block_has_only_trap (basic_block bb)
*** 3207,3213 ****
    rtx trap;
  
    /* We're not the exit block.  */
!   if (bb == EXIT_BLOCK_PTR)
      return NULL_RTX;
  
    /* The block must have no successors.  */
--- 3207,3213 ----
    rtx trap;
  
    /* We're not the exit block.  */
!   if (bb == cfun->cfg->exit_block_ptr)
      return NULL_RTX;
  
    /* The block must have no successors.  */
*************** find_if_case_1 (basic_block test_bb, edg
*** 3372,3378 ****
  
    if (then_bb->next_bb == else_bb
        && then_bb->prev_bb == test_bb
!       && else_bb != EXIT_BLOCK_PTR)
      {
        redirect_edge_succ (FALLTHRU_EDGE (test_bb), else_bb);
        new_bb = 0;
--- 3372,3378 ----
  
    if (then_bb->next_bb == else_bb
        && then_bb->prev_bb == test_bb
!       && else_bb != cfun->cfg->exit_block_ptr)
      {
        redirect_edge_succ (FALLTHRU_EDGE (test_bb), else_bb);
        new_bb = 0;
Index: cfgbuild.c
===================================================================
-c -L cfgbuild.c	(revision 112224) -L cfgbuild.c	(working copy) .svn/text-base/cfgbuild.c.svn-base cfgbuild.c
*** cfgbuild.c	(revision 112224)
--- cfgbuild.c	(working copy)
*************** make_edges (basic_block min, basic_block
*** 255,264 ****
    if (forced_labels || cfun->max_jumptable_ents > 100)
      edge_cache = sbitmap_alloc (last_basic_block);
  
!   /* By nature of the way these get numbered, ENTRY_BLOCK_PTR->next_bb block
       is always the entry.  */
!   if (min == ENTRY_BLOCK_PTR->next_bb)
!     make_edge (ENTRY_BLOCK_PTR, min, EDGE_FALLTHRU);
  
    FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
      {
--- 255,264 ----
    if (forced_labels || cfun->max_jumptable_ents > 100)
      edge_cache = sbitmap_alloc (last_basic_block);
  
!   /* By nature of the way these get numbered, cfun->cfg->entry_block_ptr->next_bb block
       is always the entry.  */
!   if (min == cfun->cfg->entry_block_ptr->next_bb)
!     make_edge (cfun->cfg->entry_block_ptr, min, EDGE_FALLTHRU);
  
    FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
      {
*************** make_edges (basic_block min, basic_block
*** 277,290 ****
  	  if (update_p)
  	    {
  	      FOR_EACH_EDGE (e, ei, bb->succs)
! 		if (e->dest != EXIT_BLOCK_PTR)
  		  SET_BIT (edge_cache, e->dest->index);
  	    }
  	}
  
        if (LABEL_P (BB_HEAD (bb))
  	  && LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
! 	cached_make_edge (NULL, ENTRY_BLOCK_PTR, bb, 0);
  
        /* Examine the last instruction of the block, and discover the
  	 ways we can leave the block.  */
--- 277,290 ----
  	  if (update_p)
  	    {
  	      FOR_EACH_EDGE (e, ei, bb->succs)
! 		if (e->dest != cfun->cfg->exit_block_ptr)
  		  SET_BIT (edge_cache, e->dest->index);
  	    }
  	}
  
        if (LABEL_P (BB_HEAD (bb))
  	  && LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
! 	cached_make_edge (NULL, cfun->cfg->entry_block_ptr, bb, 0);
  
        /* Examine the last instruction of the block, and discover the
  	 ways we can leave the block.  */
*************** make_edges (basic_block min, basic_block
*** 342,348 ****
  
  	  /* Returns create an exit out.  */
  	  else if (returnjump_p (insn))
! 	    cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, 0);
  
  	  /* Otherwise, we have a plain conditional or unconditional jump.  */
  	  else
--- 342,348 ----
  
  	  /* Returns create an exit out.  */
  	  else if (returnjump_p (insn))
! 	    cached_make_edge (edge_cache, bb, cfun->cfg->exit_block_ptr, 0);
  
  	  /* Otherwise, we have a plain conditional or unconditional jump.  */
  	  else
*************** make_edges (basic_block min, basic_block
*** 357,363 ****
  	 worry about EH edges, since we wouldn't have created the sibling call
  	 in the first place.  */
        if (code == CALL_INSN && SIBLING_CALL_P (insn))
! 	cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR,
  			  EDGE_SIBCALL | EDGE_ABNORMAL);
  
        /* If this is a CALL_INSN, then mark it as reaching the active EH
--- 357,363 ----
  	 worry about EH edges, since we wouldn't have created the sibling call
  	 in the first place.  */
        if (code == CALL_INSN && SIBLING_CALL_P (insn))
! 	cached_make_edge (edge_cache, bb, cfun->cfg->exit_block_ptr,
  			  EDGE_SIBCALL | EDGE_ABNORMAL);
  
        /* If this is a CALL_INSN, then mark it as reaching the active EH
*************** make_edges (basic_block min, basic_block
*** 391,397 ****
  
        /* Find out if we can drop through to the next block.  */
        insn = NEXT_INSN (insn);
!       e = find_edge (bb, EXIT_BLOCK_PTR);
        if (e && e->flags & EDGE_FALLTHRU)
  	insn = NULL;
  
--- 391,397 ----
  
        /* Find out if we can drop through to the next block.  */
        insn = NEXT_INSN (insn);
!       e = find_edge (bb, cfun->cfg->exit_block_ptr);
        if (e && e->flags & EDGE_FALLTHRU)
  	insn = NULL;
  
*************** make_edges (basic_block min, basic_block
*** 401,408 ****
  	insn = NEXT_INSN (insn);
  
        if (!insn)
! 	cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
!       else if (bb->next_bb != EXIT_BLOCK_PTR)
  	{
  	  if (insn == BB_HEAD (bb->next_bb))
  	    cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
--- 401,408 ----
  	insn = NEXT_INSN (insn);
  
        if (!insn)
! 	cached_make_edge (edge_cache, bb, cfun->cfg->exit_block_ptr, EDGE_FALLTHRU);
!       else if (bb->next_bb != cfun->cfg->exit_block_ptr)
  	{
  	  if (insn == BB_HEAD (bb->next_bb))
  	    cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
*************** find_basic_blocks_1 (rtx f)
*** 425,431 ****
    rtx bb_note = NULL_RTX;
    rtx head = NULL_RTX;
    rtx end = NULL_RTX;
!   basic_block prev = ENTRY_BLOCK_PTR;
  
    /* We process the instructions in a slightly different way than we did
       previously.  This is so that we see a NOTE_BASIC_BLOCK after we have
--- 425,431 ----
    rtx bb_note = NULL_RTX;
    rtx head = NULL_RTX;
    rtx end = NULL_RTX;
!   basic_block prev = cfun->cfg->entry_block_ptr;
  
    /* We process the instructions in a slightly different way than we did
       previously.  This is so that we see a NOTE_BASIC_BLOCK after we have
*************** find_basic_blocks (rtx f)
*** 530,537 ****
  
    n_basic_blocks = count_basic_blocks (f);
    last_basic_block = NUM_FIXED_BLOCKS;
!   ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
!   EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
  
  
    /* Size the basic block table.  The actual structures will be allocated
--- 530,537 ----
  
    n_basic_blocks = count_basic_blocks (f);
    last_basic_block = NUM_FIXED_BLOCKS;
!   cfun->cfg->entry_block_ptr->next_bb = cfun->cfg->exit_block_ptr;
!   cfun->cfg->exit_block_ptr->prev_bb = cfun->cfg->entry_block_ptr;
  
  
    /* Size the basic block table.  The actual structures will be allocated
*************** find_basic_blocks (rtx f)
*** 546,553 ****
    VEC_safe_grow (basic_block, gc, basic_block_info, n_basic_blocks);
    memset (VEC_address (basic_block, basic_block_info), 0,
  	  sizeof (basic_block) * n_basic_blocks);
!   SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR);
!   SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR);
  
    find_basic_blocks_1 (f);
  
--- 546,553 ----
    VEC_safe_grow (basic_block, gc, basic_block_info, n_basic_blocks);
    memset (VEC_address (basic_block, basic_block_info), 0,
  	  sizeof (basic_block) * n_basic_blocks);
!   SET_BASIC_BLOCK (ENTRY_BLOCK, cfun->cfg->entry_block_ptr);
!   SET_BASIC_BLOCK (EXIT_BLOCK, cfun->cfg->exit_block_ptr);
  
    find_basic_blocks_1 (f);
  
*************** find_basic_blocks (rtx f)
*** 558,564 ****
      SET_STATE (bb, BLOCK_NEW);
  
    /* Discover the edges of our cfg.  */
!   make_edges (ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
  
    /* Do very simple cleanup now, for the benefit of code that runs between
       here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns.  */
--- 558,564 ----
      SET_STATE (bb, BLOCK_NEW);
  
    /* Discover the edges of our cfg.  */
!   make_edges (cfun->cfg->entry_block_ptr->next_bb, cfun->cfg->exit_block_ptr->prev_bb, 0);
  
    /* Do very simple cleanup now, for the benefit of code that runs between
       here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns.  */
*************** find_bb_boundaries (basic_block bb)
*** 658,664 ****
  	  remove_edge (fallthru);
  	  flow_transfer_insn = NULL_RTX;
  	  if (LABEL_ALT_ENTRY_P (insn))
! 	    make_edge (ENTRY_BLOCK_PTR, bb, 0);
  	}
  
        /* In case we've previously seen an insn that effects a control
--- 658,664 ----
  	  remove_edge (fallthru);
  	  flow_transfer_insn = NULL_RTX;
  	  if (LABEL_ALT_ENTRY_P (insn))
! 	    make_edge (cfun->cfg->entry_block_ptr, bb, 0);
  	}
  
        /* In case we've previously seen an insn that effects a control
*************** find_many_sub_basic_blocks (sbitmap bloc
*** 760,766 ****
        break;
  
    min = max = bb;
!   for (; bb != EXIT_BLOCK_PTR; bb = bb->next_bb)
      if (STATE (bb) != BLOCK_ORIGINAL)
        max = bb;
  
--- 760,766 ----
        break;
  
    min = max = bb;
!   for (; bb != cfun->cfg->exit_block_ptr; bb = bb->next_bb)
      if (STATE (bb) != BLOCK_ORIGINAL)
        max = bb;
  
Index: predict.c
===================================================================
-c -L predict.c	(revision 112224) -L predict.c	(working copy) .svn/text-base/predict.c.svn-base predict.c
*** predict.c	(revision 112224)
--- predict.c	(working copy)
*************** void
*** 232,238 ****
  tree_predict_edge (edge e, enum br_predictor predictor, int probability)
  {
    gcc_assert (profile_status != PROFILE_GUESSED);
!   if ((e->src != ENTRY_BLOCK_PTR && EDGE_COUNT (e->src->succs) > 1)
        && flag_guess_branch_prob && optimize)
      {
        struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
--- 232,238 ----
  tree_predict_edge (edge e, enum br_predictor predictor, int probability)
  {
    gcc_assert (profile_status != PROFILE_GUESSED);
!   if ((e->src != cfun->cfg->entry_block_ptr && EDGE_COUNT (e->src->succs) > 1)
        && flag_guess_branch_prob && optimize)
      {
        struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction));
*************** apply_return_prediction (int *heads)
*** 1140,1146 ****
    enum prediction direction;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      {
        return_stmt = last_stmt (e->src);
        if (TREE_CODE (return_stmt) == RETURN_EXPR)
--- 1140,1146 ----
    enum prediction direction;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      {
        return_stmt = last_stmt (e->src);
        if (TREE_CODE (return_stmt) == RETURN_EXPR)
*************** tree_bb_level_predictions (void)
*** 1193,1199 ****
  
    heads = XNEWVEC (int, last_basic_block);
    memset (heads, ENTRY_BLOCK, sizeof (int) * last_basic_block);
!   heads[ENTRY_BLOCK_PTR->next_bb->index] = last_basic_block;
  
    apply_return_prediction (heads);
  
--- 1193,1199 ----
  
    heads = XNEWVEC (int, last_basic_block);
    memset (heads, ENTRY_BLOCK, sizeof (int) * last_basic_block);
!   heads[cfun->cfg->entry_block_ptr->next_bb->index] = last_basic_block;
  
    apply_return_prediction (heads);
  
*************** tree_estimate_probability (void)
*** 1259,1265 ****
  	  /* Predict early returns to be probable, as we've already taken
  	     care for error returns and other cases are often used for
  	     fast paths trought function.  */
! 	  if (e->dest == EXIT_BLOCK_PTR
  	      && TREE_CODE (last_stmt (bb)) == RETURN_EXPR
  	      && !single_pred_p (bb))
  	    {
--- 1259,1265 ----
  	  /* Predict early returns to be probable, as we've already taken
  	     care for error returns and other cases are often used for
  	     fast paths trought function.  */
! 	  if (e->dest == cfun->cfg->exit_block_ptr
  	      && TREE_CODE (last_stmt (bb)) == RETURN_EXPR
  	      && !single_pred_p (bb))
  	    {
*************** tree_estimate_probability (void)
*** 1276,1282 ****
  
  	  /* Look for block we are guarding (ie we dominate it,
  	     but it doesn't postdominate us).  */
! 	  if (e->dest != EXIT_BLOCK_PTR && e->dest != bb
  	      && dominated_by_p (CDI_DOMINATORS, e->dest, e->src)
  	      && !dominated_by_p (CDI_POST_DOMINATORS, e->src, e->dest))
  	    {
--- 1276,1282 ----
  
  	  /* Look for block we are guarding (ie we dominate it,
  	     but it doesn't postdominate us).  */
! 	  if (e->dest != cfun->cfg->exit_block_ptr && e->dest != bb
  	      && dominated_by_p (CDI_DOMINATORS, e->dest, e->src)
  	      && !dominated_by_p (CDI_POST_DOMINATORS, e->src, e->dest))
  	    {
*************** expected_value_to_br_prob (void)
*** 1398,1410 ****
  static bool
  last_basic_block_p (basic_block bb)
  {
!   if (bb == EXIT_BLOCK_PTR)
      return false;
  
!   return (bb->next_bb == EXIT_BLOCK_PTR
! 	  || (bb->next_bb->next_bb == EXIT_BLOCK_PTR
  	      && single_succ_p (bb)
! 	      && single_succ (bb)->next_bb == EXIT_BLOCK_PTR));
  }
  
  /* Sets branch probabilities according to PREDiction and
--- 1398,1410 ----
  static bool
  last_basic_block_p (basic_block bb)
  {
!   if (bb == cfun->cfg->exit_block_ptr)
      return false;
  
!   return (bb->next_bb == cfun->cfg->exit_block_ptr
! 	  || (bb->next_bb->next_bb == cfun->cfg->exit_block_ptr
  	      && single_succ_p (bb)
! 	      && single_succ (bb)->next_bb == cfun->cfg->exit_block_ptr));
  }
  
  /* Sets branch probabilities according to PREDiction and
*************** propagate_freq (struct loop *loop, bitma
*** 1512,1518 ****
        int count = 0;
  
         /* The outermost "loop" includes the exit block, which we can not
! 	  look up via BASIC_BLOCK.  Detect this and use EXIT_BLOCK_PTR
  	  directly.  Do the same for the entry block.  */
        bb = BASIC_BLOCK (i);
  
--- 1512,1518 ----
        int count = 0;
  
         /* The outermost "loop" includes the exit block, which we can not
! 	  look up via BASIC_BLOCK.  Detect this and use cfun->cfg->exit_block_ptr
  	  directly.  Do the same for the entry block.  */
        bb = BASIC_BLOCK (i);
  
*************** counts_to_freqs (void)
*** 1674,1680 ****
      true_count_max = MAX (bb->count, true_count_max);
  
    count_max = MAX (true_count_max, 1);
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      bb->frequency = (bb->count * BB_FREQ_MAX + count_max / 2) / count_max;
    return true_count_max;
  }
--- 1674,1680 ----
      true_count_max = MAX (bb->count, true_count_max);
  
    count_max = MAX (true_count_max, 1);
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      bb->frequency = (bb->count * BB_FREQ_MAX + count_max / 2) / count_max;
    return true_count_max;
  }
*************** expensive_function_p (int threshold)
*** 1698,1708 ****
    /* Frequencies are out of range.  This either means that function contains
       internal loop executing more than BB_FREQ_MAX times or profile feedback
       is available and function has not been executed at all.  */
!   if (ENTRY_BLOCK_PTR->frequency == 0)
      return true;
  
    /* Maximally BB_FREQ_MAX^2 so overflow won't happen.  */
!   limit = ENTRY_BLOCK_PTR->frequency * threshold;
    FOR_EACH_BB (bb)
      {
        rtx insn;
--- 1698,1708 ----
    /* Frequencies are out of range.  This either means that function contains
       internal loop executing more than BB_FREQ_MAX times or profile feedback
       is available and function has not been executed at all.  */
!   if (cfun->cfg->entry_block_ptr->frequency == 0)
      return true;
  
    /* Maximally BB_FREQ_MAX^2 so overflow won't happen.  */
!   limit = cfun->cfg->entry_block_ptr->frequency * threshold;
    FOR_EACH_BB (bb)
      {
        rtx insn;
*************** estimate_bb_frequencies (struct loops *l
*** 1747,1759 ****
  
        mark_dfs_back_edges ();
  
!       single_succ_edge (ENTRY_BLOCK_PTR)->probability = REG_BR_PROB_BASE;
  
        /* Set up block info for each basic block.  */
        tovisit = BITMAP_ALLOC (NULL);
        alloc_aux_for_blocks (sizeof (struct block_info_def));
        alloc_aux_for_edges (sizeof (struct edge_info_def));
!       FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
  	{
  	  edge e;
  	  edge_iterator ei;
--- 1747,1759 ----
  
        mark_dfs_back_edges ();
  
!       single_succ_edge (cfun->cfg->entry_block_ptr)->probability = REG_BR_PROB_BASE;
  
        /* Set up block info for each basic block.  */
        tovisit = BITMAP_ALLOC (NULL);
        alloc_aux_for_blocks (sizeof (struct block_info_def));
        alloc_aux_for_edges (sizeof (struct edge_info_def));
!       FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
  	{
  	  edge e;
  	  edge_iterator ei;
*************** estimate_bb_frequencies (struct loops *l
*** 1777,1783 ****
  	  memcpy (&freq_max, &BLOCK_INFO (bb)->frequency, sizeof (freq_max));
  
        sreal_div (&freq_max, &real_bb_freq_max, &freq_max);
!       FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
  	{
  	  sreal tmp;
  
--- 1777,1783 ----
  	  memcpy (&freq_max, &BLOCK_INFO (bb)->frequency, sizeof (freq_max));
  
        sreal_div (&freq_max, &real_bb_freq_max, &freq_max);
!       FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
  	{
  	  sreal tmp;
  
Index: lcm.c
===================================================================
-c -L lcm.c	(revision 112224) -L lcm.c	(working copy) .svn/text-base/lcm.c.svn-base lcm.c
*** lcm.c	(revision 112224)
--- lcm.c	(working copy)
*************** compute_antinout_edge (sbitmap *antloc, 
*** 127,134 ****
  
    /* Mark blocks which are predecessors of the exit block so that we
       can easily identify them below.  */
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
!     e->src->aux = EXIT_BLOCK_PTR;
  
    /* Iterate until the worklist is empty.  */
    while (qlen)
--- 127,134 ----
  
    /* Mark blocks which are predecessors of the exit block so that we
       can easily identify them below.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
!     e->src->aux = cfun->cfg->exit_block_ptr;
  
    /* Iterate until the worklist is empty.  */
    while (qlen)
*************** compute_antinout_edge (sbitmap *antloc, 
*** 140,146 ****
        if (qout >= qend)
  	qout = worklist;
  
!       if (bb->aux == EXIT_BLOCK_PTR)
  	/* Do not clear the aux field for blocks which are predecessors of
  	   the EXIT block.  That way we never add then to the worklist
  	   again.  */
--- 140,146 ----
        if (qout >= qend)
  	qout = worklist;
  
!       if (bb->aux == cfun->cfg->exit_block_ptr)
  	/* Do not clear the aux field for blocks which are predecessors of
  	   the EXIT block.  That way we never add then to the worklist
  	   again.  */
*************** compute_antinout_edge (sbitmap *antloc, 
*** 159,165 ****
  	   to add the predecessors of this block to the worklist
  	   if they are not already on the worklist.  */
  	FOR_EACH_EDGE (e, ei, bb->preds)
! 	  if (!e->src->aux && e->src != ENTRY_BLOCK_PTR)
  	    {
  	      *qin++ = e->src;
  	      e->src->aux = e;
--- 159,165 ----
  	   to add the predecessors of this block to the worklist
  	   if they are not already on the worklist.  */
  	FOR_EACH_EDGE (e, ei, bb->preds)
! 	  if (!e->src->aux && e->src != cfun->cfg->entry_block_ptr)
  	    {
  	      *qin++ = e->src;
  	      e->src->aux = e;
*************** compute_earliest (struct edge_list *edge
*** 194,204 ****
      {
        pred = INDEX_EDGE_PRED_BB (edge_list, x);
        succ = INDEX_EDGE_SUCC_BB (edge_list, x);
!       if (pred == ENTRY_BLOCK_PTR)
  	sbitmap_copy (earliest[x], antin[succ->index]);
        else
  	{
! 	  if (succ == EXIT_BLOCK_PTR)
  	    sbitmap_zero (earliest[x]);
  	  else
  	    {
--- 194,204 ----
      {
        pred = INDEX_EDGE_PRED_BB (edge_list, x);
        succ = INDEX_EDGE_SUCC_BB (edge_list, x);
!       if (pred == cfun->cfg->entry_block_ptr)
  	sbitmap_copy (earliest[x], antin[succ->index]);
        else
  	{
! 	  if (succ == cfun->cfg->exit_block_ptr)
  	    sbitmap_zero (earliest[x]);
  	  else
  	    {
*************** compute_laterin (struct edge_list *edge_
*** 282,288 ****
       do not want to be overly optimistic.  Consider an outgoing edge from
       the entry block.  That edge should always have a LATER value the
       same as EARLIEST for that edge.  */
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      sbitmap_copy (later[(size_t) e->aux], earliest[(size_t) e->aux]);
  
    /* Add all the blocks to the worklist.  This prevents an early exit from
--- 282,288 ----
       do not want to be overly optimistic.  Consider an outgoing edge from
       the entry block.  That edge should always have a LATER value the
       same as EARLIEST for that edge.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      sbitmap_copy (later[(size_t) e->aux], earliest[(size_t) e->aux]);
  
    /* Add all the blocks to the worklist.  This prevents an early exit from
*************** compute_laterin (struct edge_list *edge_
*** 323,329 ****
  				      antloc[e->src->index])
  	    /* If LATER for an outgoing edge was changed, then we need
  	       to add the target of the outgoing edge to the worklist.  */
! 	    && e->dest != EXIT_BLOCK_PTR && e->dest->aux == 0)
  	  {
  	    *qin++ = e->dest;
  	    e->dest->aux = e;
--- 323,329 ----
  				      antloc[e->src->index])
  	    /* If LATER for an outgoing edge was changed, then we need
  	       to add the target of the outgoing edge to the worklist.  */
! 	    && e->dest != cfun->cfg->exit_block_ptr && e->dest->aux == 0)
  	  {
  	    *qin++ = e->dest;
  	    e->dest->aux = e;
*************** compute_laterin (struct edge_list *edge_
*** 337,343 ****
       for the EXIT block.  We allocated an extra entry in the LATERIN array
       for just this purpose.  */
    sbitmap_ones (laterin[last_basic_block]);
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      sbitmap_a_and_b (laterin[last_basic_block],
  		     laterin[last_basic_block],
  		     later[(size_t) e->aux]);
--- 337,343 ----
       for the EXIT block.  We allocated an extra entry in the LATERIN array
       for just this purpose.  */
    sbitmap_ones (laterin[last_basic_block]);
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      sbitmap_a_and_b (laterin[last_basic_block],
  		     laterin[last_basic_block],
  		     later[(size_t) e->aux]);
*************** compute_insert_delete (struct edge_list 
*** 364,370 ****
      {
        basic_block b = INDEX_EDGE_SUCC_BB (edge_list, x);
  
!       if (b == EXIT_BLOCK_PTR)
  	sbitmap_difference (insert[x], later[x], laterin[last_basic_block]);
        else
  	sbitmap_difference (insert[x], later[x], laterin[b->index]);
--- 364,370 ----
      {
        basic_block b = INDEX_EDGE_SUCC_BB (edge_list, x);
  
!       if (b == cfun->cfg->exit_block_ptr)
  	sbitmap_difference (insert[x], later[x], laterin[last_basic_block]);
        else
  	sbitmap_difference (insert[x], later[x], laterin[b->index]);
*************** compute_available (sbitmap *avloc, sbitm
*** 504,511 ****
  
    /* Mark blocks which are successors of the entry block so that we
       can easily identify them below.  */
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
!     e->dest->aux = ENTRY_BLOCK_PTR;
  
    /* Iterate until the worklist is empty.  */
    while (qlen)
--- 504,511 ----
  
    /* Mark blocks which are successors of the entry block so that we
       can easily identify them below.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
!     e->dest->aux = cfun->cfg->entry_block_ptr;
  
    /* Iterate until the worklist is empty.  */
    while (qlen)
*************** compute_available (sbitmap *avloc, sbitm
*** 520,526 ****
        /* If one of the predecessor blocks is the ENTRY block, then the
  	 intersection of avouts is the null set.  We can identify such blocks
  	 by the special value in the AUX field in the block structure.  */
!       if (bb->aux == ENTRY_BLOCK_PTR)
  	/* Do not clear the aux field for blocks which are successors of the
  	   ENTRY block.  That way we never add then to the worklist again.  */
  	sbitmap_zero (avin[bb->index]);
--- 520,526 ----
        /* If one of the predecessor blocks is the ENTRY block, then the
  	 intersection of avouts is the null set.  We can identify such blocks
  	 by the special value in the AUX field in the block structure.  */
!       if (bb->aux == cfun->cfg->entry_block_ptr)
  	/* Do not clear the aux field for blocks which are successors of the
  	   ENTRY block.  That way we never add then to the worklist again.  */
  	sbitmap_zero (avin[bb->index]);
*************** compute_available (sbitmap *avloc, sbitm
*** 538,544 ****
  	   to add the successors of this block to the worklist
  	   if they are not already on the worklist.  */
  	FOR_EACH_EDGE (e, ei, bb->succs)
! 	  if (!e->dest->aux && e->dest != EXIT_BLOCK_PTR)
  	    {
  	      *qin++ = e->dest;
  	      e->dest->aux = e;
--- 538,544 ----
  	   to add the successors of this block to the worklist
  	   if they are not already on the worklist.  */
  	FOR_EACH_EDGE (e, ei, bb->succs)
! 	  if (!e->dest->aux && e->dest != cfun->cfg->exit_block_ptr)
  	    {
  	      *qin++ = e->dest;
  	      e->dest->aux = e;
*************** compute_farthest (struct edge_list *edge
*** 574,584 ****
      {
        pred = INDEX_EDGE_PRED_BB (edge_list, x);
        succ = INDEX_EDGE_SUCC_BB (edge_list, x);
!       if (succ == EXIT_BLOCK_PTR)
  	sbitmap_copy (farthest[x], st_avout[pred->index]);
        else
  	{
! 	  if (pred == ENTRY_BLOCK_PTR)
  	    sbitmap_zero (farthest[x]);
  	  else
  	    {
--- 574,584 ----
      {
        pred = INDEX_EDGE_PRED_BB (edge_list, x);
        succ = INDEX_EDGE_SUCC_BB (edge_list, x);
!       if (succ == cfun->cfg->exit_block_ptr)
  	sbitmap_copy (farthest[x], st_avout[pred->index]);
        else
  	{
! 	  if (pred == cfun->cfg->entry_block_ptr)
  	    sbitmap_zero (farthest[x]);
  	  else
  	    {
*************** compute_nearerout (struct edge_list *edg
*** 628,634 ****
       do not want to be overly optimistic.  Consider an incoming edge to
       the exit block.  That edge should always have a NEARER value the
       same as FARTHEST for that edge.  */
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      sbitmap_copy (nearer[(size_t)e->aux], farthest[(size_t)e->aux]);
  
    /* Add all the blocks to the worklist.  This prevents an early exit
--- 628,634 ----
       do not want to be overly optimistic.  Consider an incoming edge to
       the exit block.  That edge should always have a NEARER value the
       same as FARTHEST for that edge.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      sbitmap_copy (nearer[(size_t)e->aux], farthest[(size_t)e->aux]);
  
    /* Add all the blocks to the worklist.  This prevents an early exit
*************** compute_nearerout (struct edge_list *edg
*** 660,666 ****
  				      st_avloc[e->dest->index])
  	    /* If NEARER for an incoming edge was changed, then we need
  	       to add the source of the incoming edge to the worklist.  */
! 	    && e->src != ENTRY_BLOCK_PTR && e->src->aux == 0)
  	  {
  	    *tos++ = e->src;
  	    e->src->aux = e;
--- 660,666 ----
  				      st_avloc[e->dest->index])
  	    /* If NEARER for an incoming edge was changed, then we need
  	       to add the source of the incoming edge to the worklist.  */
! 	    && e->src != cfun->cfg->entry_block_ptr && e->src->aux == 0)
  	  {
  	    *tos++ = e->src;
  	    e->src->aux = e;
*************** compute_nearerout (struct edge_list *edg
*** 671,677 ****
       for the ENTRY block.  We allocated an extra entry in the NEAREROUT array
       for just this purpose.  */
    sbitmap_ones (nearerout[last_basic_block]);
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      sbitmap_a_and_b (nearerout[last_basic_block],
  		     nearerout[last_basic_block],
  		     nearer[(size_t) e->aux]);
--- 671,677 ----
       for the ENTRY block.  We allocated an extra entry in the NEAREROUT array
       for just this purpose.  */
    sbitmap_ones (nearerout[last_basic_block]);
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      sbitmap_a_and_b (nearerout[last_basic_block],
  		     nearerout[last_basic_block],
  		     nearer[(size_t) e->aux]);
*************** compute_rev_insert_delete (struct edge_l
*** 697,703 ****
    for (x = 0; x < NUM_EDGES (edge_list); x++)
      {
        basic_block b = INDEX_EDGE_PRED_BB (edge_list, x);
!       if (b == ENTRY_BLOCK_PTR)
  	sbitmap_difference (insert[x], nearer[x], nearerout[last_basic_block]);
        else
  	sbitmap_difference (insert[x], nearer[x], nearerout[b->index]);
--- 697,703 ----
    for (x = 0; x < NUM_EDGES (edge_list); x++)
      {
        basic_block b = INDEX_EDGE_PRED_BB (edge_list, x);
!       if (b == cfun->cfg->entry_block_ptr)
  	sbitmap_difference (insert[x], nearer[x], nearerout[last_basic_block]);
        else
  	sbitmap_difference (insert[x], nearer[x], nearerout[b->index]);
Index: regmove.c
===================================================================
-c -L regmove.c	(revision 112224) -L regmove.c	(working copy) .svn/text-base/regmove.c.svn-base regmove.c
*** regmove.c	(revision 112224)
--- regmove.c	(working copy)
*************** regmove_optimize (rtx f, int nregs)
*** 1495,1501 ****
        rtx new = end;
        rtx next = NEXT_INSN (new);
        while (next != 0 && INSN_UID (next) >= old_max_uid
! 	     && (bb->next_bb == EXIT_BLOCK_PTR || BB_HEAD (bb->next_bb) != next))
  	new = next, next = NEXT_INSN (new);
        BB_END (bb) = new;
      }
--- 1495,1501 ----
        rtx new = end;
        rtx next = NEXT_INSN (new);
        while (next != 0 && INSN_UID (next) >= old_max_uid
! 	     && (bb->next_bb == cfun->cfg->exit_block_ptr || BB_HEAD (bb->next_bb) != next))
  	new = next, next = NEXT_INSN (new);
        BB_END (bb) = new;
      }
Index: function.c
===================================================================
-c -L function.c	(revision 112224) -L function.c	(working copy) .svn/text-base/function.c.svn-base function.c
*** function.c	(revision 112224)
--- function.c	(working copy)
*************** keep_stack_depressed (rtx insns)
*** 4879,4885 ****
  		    && !fixed_regs[regno]
  		    && TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)
  		    && !REGNO_REG_SET_P
! 		         (EXIT_BLOCK_PTR->il.rtl->global_live_at_start, regno)
  		    && !refers_to_regno_p (regno,
  					   regno + hard_regno_nregs[regno]
  								   [Pmode],
--- 4879,4885 ----
  		    && !fixed_regs[regno]
  		    && TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)
  		    && !REGNO_REG_SET_P
! 		         (cfun->cfg->exit_block_ptr->il.rtl->global_live_at_start, regno)
  		    && !refers_to_regno_p (regno,
  					   regno + hard_regno_nregs[regno]
  								   [Pmode],
*************** thread_prologue_and_epilogue_insns (rtx 
*** 5125,5140 ****
        /* Can't deal with multiple successors of the entry block
           at the moment.  Function should always have at least one
           entry point.  */
!       gcc_assert (single_succ_p (ENTRY_BLOCK_PTR));
  
!       insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
        inserted = 1;
      }
  #endif
  
    /* If the exit block has no non-fake predecessors, we don't need
       an epilogue.  */
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      if ((e->flags & EDGE_FAKE) == 0)
        break;
    if (e == NULL)
--- 5125,5140 ----
        /* Can't deal with multiple successors of the entry block
           at the moment.  Function should always have at least one
           entry point.  */
!       gcc_assert (single_succ_p (cfun->cfg->entry_block_ptr));
  
!       insert_insn_on_edge (seq, single_succ_edge (cfun->cfg->entry_block_ptr));
        inserted = 1;
      }
  #endif
  
    /* If the exit block has no non-fake predecessors, we don't need
       an epilogue.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      if ((e->flags & EDGE_FAKE) == 0)
        break;
    if (e == NULL)
*************** thread_prologue_and_epilogue_insns (rtx 
*** 5152,5158 ****
        basic_block last;
        rtx label;
  
!       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
  	if (e->flags & EDGE_FALLTHRU)
  	  break;
        if (e == NULL)
--- 5152,5158 ----
        basic_block last;
        rtx label;
  
!       FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
  	if (e->flags & EDGE_FALLTHRU)
  	  break;
        if (e == NULL)
*************** thread_prologue_and_epilogue_insns (rtx 
*** 5189,5195 ****
  	      basic_block bb = e->src;
  	      rtx jump;
  
! 	      if (bb == ENTRY_BLOCK_PTR)
  		{
  		  ei_next (&ei2);
  		  continue;
--- 5189,5195 ----
  	      basic_block bb = e->src;
  	      rtx jump;
  
! 	      if (bb == cfun->cfg->entry_block_ptr)
  		{
  		  ei_next (&ei2);
  		  continue;
*************** thread_prologue_and_epilogue_insns (rtx 
*** 5236,5242 ****
  		}
  
  	      /* Fix up the CFG for the successful change we just made.  */
! 	      redirect_edge_succ (e, EXIT_BLOCK_PTR);
  	    }
  
  	  /* Emit a return insn for the exit fallthru block.  Whether
--- 5236,5242 ----
  		}
  
  	      /* Fix up the CFG for the successful change we just made.  */
! 	      redirect_edge_succ (e, cfun->cfg->exit_block_ptr);
  	    }
  
  	  /* Emit a return insn for the exit fallthru block.  Whether
*************** thread_prologue_and_epilogue_insns (rtx 
*** 5255,5261 ****
       There really shouldn't be a mixture -- either all should have
       been converted or none, however...  */
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      if (e->flags & EDGE_FALLTHRU)
        break;
    if (e == NULL)
--- 5255,5261 ----
       There really shouldn't be a mixture -- either all should have
       been converted or none, however...  */
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      if (e->flags & EDGE_FALLTHRU)
        break;
    if (e == NULL)
*************** epilogue_done:
*** 5317,5323 ****
  
  #ifdef HAVE_sibcall_epilogue
    /* Emit sibling epilogues before any sibling call sites.  */
!   for (ei = ei_start (EXIT_BLOCK_PTR->preds); (e = ei_safe_edge (ei)); )
      {
        basic_block bb = e->src;
        rtx insn = BB_END (bb);
--- 5317,5323 ----
  
  #ifdef HAVE_sibcall_epilogue
    /* Emit sibling epilogues before any sibling call sites.  */
!   for (ei = ei_start (cfun->cfg->exit_block_ptr->preds); (e = ei_safe_edge (ei)); )
      {
        basic_block bb = e->src;
        rtx insn = BB_END (bb);
*************** epilogue_done:
*** 5379,5385 ****
  	}
  
        /* Find the last line number note in the first block.  */
!       for (insn = BB_END (ENTRY_BLOCK_PTR->next_bb);
  	   insn != prologue_end && insn;
  	   insn = PREV_INSN (insn))
  	if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
--- 5379,5385 ----
  	}
  
        /* Find the last line number note in the first block.  */
!       for (insn = BB_END (cfun->cfg->entry_block_ptr->next_bb);
  	   insn != prologue_end && insn;
  	   insn = PREV_INSN (insn))
  	if (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) > 0)
Index: gcse.c
===================================================================
-c -L gcse.c	(revision 112224) -L gcse.c	(working copy) .svn/text-base/gcse.c.svn-base gcse.c
*** gcse.c	(revision 112224)
--- gcse.c	(working copy)
*************** cprop (int alter_jumps)
*** 3251,3257 ****
    rtx insn;
  
    /* Note we start at block 1.  */
!   if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      {
        if (dump_file != NULL)
  	fprintf (dump_file, "\n");
--- 3251,3257 ----
    rtx insn;
  
    /* Note we start at block 1.  */
!   if (cfun->cfg->entry_block_ptr->next_bb == cfun->cfg->exit_block_ptr)
      {
        if (dump_file != NULL)
  	fprintf (dump_file, "\n");
*************** cprop (int alter_jumps)
*** 3259,3265 ****
      }
  
    changed = 0;
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb->next_bb, EXIT_BLOCK_PTR, next_bb)
      {
        /* Reset tables used to keep track of what's still valid [since the
  	 start of the block].  */
--- 3259,3265 ----
      }
  
    changed = 0;
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr->next_bb->next_bb, cfun->cfg->exit_block_ptr, next_bb)
      {
        /* Reset tables used to keep track of what's still valid [since the
  	 start of the block].  */
*************** find_implicit_sets (void)
*** 3363,3369 ****
  					 : FALLTHRU_EDGE (bb)->dest;
  
  	    if (dest && single_pred_p (dest)
! 		&& dest != EXIT_BLOCK_PTR)
  	      {
  		new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
  					     XEXP (cond, 1));
--- 3363,3369 ----
  					 : FALLTHRU_EDGE (bb)->dest;
  
  	    if (dest && single_pred_p (dest)
! 		&& dest != cfun->cfg->exit_block_ptr)
  	      {
  		new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
  					     XEXP (cond, 1));
*************** bypass_block (basic_block bb, rtx setcc,
*** 3632,3638 ****
  	  old_dest = e->dest;
  	  if (dest != NULL
  	      && dest != old_dest
! 	      && dest != EXIT_BLOCK_PTR)
              {
  	      redirect_edge_and_branch_force (e, dest);
  
--- 3632,3638 ----
  	  old_dest = e->dest;
  	  if (dest != NULL
  	      && dest != old_dest
! 	      && dest != cfun->cfg->exit_block_ptr)
              {
  	      redirect_edge_and_branch_force (e, dest);
  
*************** bypass_conditional_jumps (void)
*** 3682,3696 ****
    rtx dest;
  
    /* Note we start at block 1.  */
!   if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      return 0;
  
    bypass_last_basic_block = last_basic_block;
    mark_dfs_back_edges ();
  
    changed = 0;
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb->next_bb,
! 		  EXIT_BLOCK_PTR, next_bb)
      {
        /* Check for more than one predecessor.  */
        if (!single_pred_p (bb))
--- 3682,3696 ----
    rtx dest;
  
    /* Note we start at block 1.  */
!   if (cfun->cfg->entry_block_ptr->next_bb == cfun->cfg->exit_block_ptr)
      return 0;
  
    bypass_last_basic_block = last_basic_block;
    mark_dfs_back_edges ();
  
    changed = 0;
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr->next_bb->next_bb,
! 		  cfun->cfg->exit_block_ptr, next_bb)
      {
        /* Check for more than one predecessor.  */
        if (!single_pred_p (bb))
*************** pre_expr_reaches_here_p_work (basic_bloc
*** 3890,3896 ****
      {
        basic_block pred_bb = pred->src;
  
!       if (pred->src == ENTRY_BLOCK_PTR
  	  /* Has predecessor has already been visited?  */
  	  || visited[pred_bb->index])
  	;/* Nothing to do.  */
--- 3890,3896 ----
      {
        basic_block pred_bb = pred->src;
  
!       if (pred->src == cfun->cfg->entry_block_ptr
  	  /* Has predecessor has already been visited?  */
  	  || visited[pred_bb->index])
  	;/* Nothing to do.  */
*************** compute_code_hoist_vbeinout (void)
*** 4736,4742 ****
  	{
  	  changed |= sbitmap_a_or_b_and_c_cg (hoist_vbein[bb->index], antloc[bb->index],
  					      hoist_vbeout[bb->index], transp[bb->index]);
! 	  if (bb->next_bb != EXIT_BLOCK_PTR)
  	    sbitmap_intersection_of_succs (hoist_vbeout[bb->index], hoist_vbein, bb->index);
  	}
  
--- 4736,4742 ----
  	{
  	  changed |= sbitmap_a_or_b_and_c_cg (hoist_vbein[bb->index], antloc[bb->index],
  					      hoist_vbeout[bb->index], transp[bb->index]);
! 	  if (bb->next_bb != cfun->cfg->exit_block_ptr)
  	    sbitmap_intersection_of_succs (hoist_vbeout[bb->index], hoist_vbein, bb->index);
  	}
  
*************** hoist_expr_reaches_here_p (basic_block e
*** 4791,4797 ****
      {
        basic_block pred_bb = pred->src;
  
!       if (pred->src == ENTRY_BLOCK_PTR)
  	break;
        else if (pred_bb == expr_bb)
  	continue;
--- 4791,4797 ----
      {
        basic_block pred_bb = pred->src;
  
!       if (pred->src == cfun->cfg->entry_block_ptr)
  	break;
        else if (pred_bb == expr_bb)
  	continue;
*************** insert_store (struct ls_expr * expr, edg
*** 6193,6199 ****
  
    /* If tmp is NULL, we found an insertion on every edge, blank the
       insertion vector for these edges, and insert at the start of the BB.  */
!   if (!tmp && bb != EXIT_BLOCK_PTR)
      {
        FOR_EACH_EDGE (tmp, ei, e->dest->preds)
  	{
--- 6193,6199 ----
  
    /* If tmp is NULL, we found an insertion on every edge, blank the
       insertion vector for these edges, and insert at the start of the BB.  */
!   if (!tmp && bb != cfun->cfg->exit_block_ptr)
      {
        FOR_EACH_EDGE (tmp, ei, e->dest->preds)
  	{
*************** remove_reachable_equiv_notes (basic_bloc
*** 6257,6263 ****
  	}
        bb = act->dest;
  
!       if (bb == EXIT_BLOCK_PTR
  	  || TEST_BIT (visited, bb->index))
  	{
  	  if (!ei_end_p (ei))
--- 6257,6263 ----
  	}
        bb = act->dest;
  
!       if (bb == cfun->cfg->exit_block_ptr
  	  || TEST_BIT (visited, bb->index))
  	{
  	  if (!ei_end_p (ei))
Index: tree-if-conv.c
===================================================================
-c -L tree-if-conv.c	(revision 112224) -L tree-if-conv.c	(working copy) .svn/text-base/tree-if-conv.c.svn-base tree-if-conv.c
*** tree-if-conv.c	(revision 112224)
--- tree-if-conv.c	(working copy)
*************** get_loop_body_in_if_conv_order (const st
*** 1035,1041 ****
    unsigned int visited_count = 0;
  
    gcc_assert (loop->num_nodes);
!   gcc_assert (loop->latch != EXIT_BLOCK_PTR);
  
    blocks = XCNEWVEC (basic_block, loop->num_nodes);
    visited = BITMAP_ALLOC (NULL);
--- 1035,1041 ----
    unsigned int visited_count = 0;
  
    gcc_assert (loop->num_nodes);
!   gcc_assert (loop->latch != cfun->cfg->exit_block_ptr);
  
    blocks = XCNEWVEC (basic_block, loop->num_nodes);
    visited = BITMAP_ALLOC (NULL);
Index: profile.c
===================================================================
-c -L profile.c	(revision 112224) -L profile.c	(working copy) .svn/text-base/profile.c.svn-base profile.c
*** profile.c	(revision 112224)
--- profile.c	(working copy)
*************** instrument_edges (struct edge_list *el)
*** 136,142 ****
    int num_edges = NUM_EDGES (el);
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 136,142 ----
    int num_edges = NUM_EDGES (el);
    basic_block bb;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** get_exec_counts (void)
*** 234,240 ****
    gcov_type *counts;
  
    /* Count the edges to be (possibly) instrumented.  */
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 234,240 ----
    gcov_type *counts;
  
    /* Count the edges to be (possibly) instrumented.  */
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** compute_branch_probabilities (void)
*** 292,298 ****
    /* Attach extra info block to each bb.  */
  
    alloc_aux_for_blocks (sizeof (struct bb_info));
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 292,298 ----
    /* Attach extra info block to each bb.  */
  
    alloc_aux_for_blocks (sizeof (struct bb_info));
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** compute_branch_probabilities (void)
*** 306,313 ****
      }
  
    /* Avoid predicting entry on exit nodes.  */
!   BB_INFO (EXIT_BLOCK_PTR)->succ_count = 2;
!   BB_INFO (ENTRY_BLOCK_PTR)->pred_count = 2;
  
    /* For each edge not on the spanning tree, set its execution count from
       the .da file.  */
--- 306,313 ----
      }
  
    /* Avoid predicting entry on exit nodes.  */
!   BB_INFO (cfun->cfg->exit_block_ptr)->succ_count = 2;
!   BB_INFO (cfun->cfg->entry_block_ptr)->pred_count = 2;
  
    /* For each edge not on the spanning tree, set its execution count from
       the .da file.  */
*************** compute_branch_probabilities (void)
*** 315,321 ****
    /* The first count in the .da file is the number of times that the function
       was entered.  This is the exec_count for block zero.  */
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 315,321 ----
    /* The first count in the .da file is the number of times that the function
       was entered.  This is the exec_count for block zero.  */
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** compute_branch_probabilities (void)
*** 375,381 ****
      {
        passes++;
        changes = 0;
!       FOR_BB_BETWEEN (bb, EXIT_BLOCK_PTR, NULL, prev_bb)
  	{
  	  struct bb_info *bi = BB_INFO (bb);
  	  if (! bi->count_valid)
--- 375,381 ----
      {
        passes++;
        changes = 0;
!       FOR_BB_BETWEEN (bb, cfun->cfg->exit_block_ptr, NULL, prev_bb)
  	{
  	  struct bb_info *bi = BB_INFO (bb);
  	  if (! bi->count_valid)
*************** compute_branch_probabilities (void)
*** 486,492 ****
    num_never_executed = 0;
    num_branches = 0;
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 486,492 ----
    num_never_executed = 0;
    num_branches = 0;
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** compute_branch_probabilities (void)
*** 506,514 ****
  	     already present.  We get negative frequency from the entry
  	     point.  */
  	  if ((e->count < 0
! 	       && e->dest == EXIT_BLOCK_PTR)
  	      || (e->count > bb->count
! 		  && e->dest != EXIT_BLOCK_PTR))
  	    {
  	      if (block_ends_with_call_p (bb))
  		e->count = e->count < 0 ? 0 : bb->count;
--- 506,514 ----
  	     already present.  We get negative frequency from the entry
  	     point.  */
  	  if ((e->count < 0
! 	       && e->dest == cfun->cfg->exit_block_ptr)
  	      || (e->count > bb->count
! 		  && e->dest != cfun->cfg->exit_block_ptr))
  	    {
  	      if (block_ends_with_call_p (bb))
  		e->count = e->count < 0 ? 0 : bb->count;
*************** branch_prob (void)
*** 836,852 ****
  	      single_succ_edge (new)->goto_locus = e->goto_locus;
  	    }
  	  if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	       && e->dest != EXIT_BLOCK_PTR)
  	    need_exit_edge = 1;
! 	  if (e->dest == EXIT_BLOCK_PTR)
  	    have_exit_edge = 1;
  	}
        FOR_EACH_EDGE (e, ei, bb->preds)
  	{
  	  if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	       && e->src != ENTRY_BLOCK_PTR)
  	    need_entry_edge = 1;
! 	  if (e->src == ENTRY_BLOCK_PTR)
  	    have_entry_edge = 1;
  	}
  
--- 836,852 ----
  	      single_succ_edge (new)->goto_locus = e->goto_locus;
  	    }
  	  if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	       && e->dest != cfun->cfg->exit_block_ptr)
  	    need_exit_edge = 1;
! 	  if (e->dest == cfun->cfg->exit_block_ptr)
  	    have_exit_edge = 1;
  	}
        FOR_EACH_EDGE (e, ei, bb->preds)
  	{
  	  if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	       && e->src != cfun->cfg->entry_block_ptr)
  	    need_entry_edge = 1;
! 	  if (e->src == cfun->cfg->entry_block_ptr)
  	    have_entry_edge = 1;
  	}
  
*************** branch_prob (void)
*** 855,868 ****
  	  if (dump_file)
  	    fprintf (dump_file, "Adding fake exit edge to bb %i\n",
  		     bb->index);
! 	  make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  	}
        if (need_entry_edge && !have_entry_edge)
  	{
  	  if (dump_file)
  	    fprintf (dump_file, "Adding fake entry edge to bb %i\n",
  		     bb->index);
! 	  make_edge (ENTRY_BLOCK_PTR, bb, EDGE_FAKE);
  	}
      }
  
--- 855,868 ----
  	  if (dump_file)
  	    fprintf (dump_file, "Adding fake exit edge to bb %i\n",
  		     bb->index);
! 	  make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  	}
        if (need_entry_edge && !have_entry_edge)
  	{
  	  if (dump_file)
  	    fprintf (dump_file, "Adding fake entry edge to bb %i\n",
  		     bb->index);
! 	  make_edge (cfun->cfg->entry_block_ptr, bb, EDGE_FAKE);
  	}
      }
  
*************** branch_prob (void)
*** 881,887 ****
  
        /* Mark edges we've replaced by fake edges above as ignored.  */
        if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	  && e->src != ENTRY_BLOCK_PTR && e->dest != EXIT_BLOCK_PTR)
  	{
  	  EDGE_INFO (e)->ignore = 1;
  	  ignored_edges++;
--- 881,887 ----
  
        /* Mark edges we've replaced by fake edges above as ignored.  */
        if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
! 	  && e->src != cfun->cfg->entry_block_ptr && e->dest != cfun->cfg->exit_block_ptr)
  	{
  	  EDGE_INFO (e)->ignore = 1;
  	  ignored_edges++;
*************** branch_prob (void)
*** 941,955 ****
     /* Keep all basic block indexes nonnegative in the gcov output.
        Index 0 is used for entry block, last index is for exit block.
        */
!   ENTRY_BLOCK_PTR->index = 1;
!   EXIT_BLOCK_PTR->index = last_basic_block;
  
    /* Arcs */
    if (coverage_begin_output ())
      {
        gcov_position_t offset;
  
!       FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
  	{
  	  edge e;
  	  edge_iterator ei;
--- 941,955 ----
     /* Keep all basic block indexes nonnegative in the gcov output.
        Index 0 is used for entry block, last index is for exit block.
        */
!   cfun->cfg->entry_block_ptr->index = 1;
!   cfun->cfg->exit_block_ptr->index = last_basic_block;
  
    /* Arcs */
    if (coverage_begin_output ())
      {
        gcov_position_t offset;
  
!       FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
  	{
  	  edge e;
  	  edge_iterator ei;
*************** branch_prob (void)
*** 1055,1061 ****
  
  	      offset = 0;
  
! 	      if (bb == ENTRY_BLOCK_PTR->next_bb)
  		{
  		  expanded_location curr_location = 
  		    expand_location (DECL_SOURCE_LOCATION
--- 1055,1061 ----
  
  	      offset = 0;
  
! 	      if (bb == cfun->cfg->entry_block_ptr->next_bb)
  		{
  		  expanded_location curr_location = 
  		    expand_location (DECL_SOURCE_LOCATION
*************** branch_prob (void)
*** 1101,1108 ****
  	 }
      }
  
!   ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
!   EXIT_BLOCK_PTR->index = EXIT_BLOCK;
  #undef BB_TO_GCOV_INDEX
  
    if (flag_profile_values)
--- 1101,1108 ----
  	 }
      }
  
!   cfun->cfg->entry_block_ptr->index = ENTRY_BLOCK;
!   cfun->cfg->exit_block_ptr->index = EXIT_BLOCK;
  #undef BB_TO_GCOV_INDEX
  
    if (flag_profile_values)
*************** find_spanning_tree (struct edge_list *el
*** 1208,1227 ****
    basic_block bb;
  
    /* We use aux field for standard union-find algorithm.  */
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      bb->aux = bb;
  
    /* Add fake edge exit to entry we can't instrument.  */
!   union_groups (EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR);
  
    /* First add all abnormal edges to the tree unless they form a cycle. Also
!      add all edges to EXIT_BLOCK_PTR to avoid inserting profiling code behind
       setting return value from function.  */
    for (i = 0; i < num_edges; i++)
      {
        edge e = INDEX_EDGE (el, i);
        if (((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_FAKE))
! 	   || e->dest == EXIT_BLOCK_PTR)
  	  && !EDGE_INFO (e)->ignore
  	  && (find_group (e->src) != find_group (e->dest)))
  	{
--- 1208,1227 ----
    basic_block bb;
  
    /* We use aux field for standard union-find algorithm.  */
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      bb->aux = bb;
  
    /* Add fake edge exit to entry we can't instrument.  */
!   union_groups (cfun->cfg->exit_block_ptr, cfun->cfg->entry_block_ptr);
  
    /* First add all abnormal edges to the tree unless they form a cycle. Also
!      add all edges to cfun->cfg->exit_block_ptr to avoid inserting profiling code behind
       setting return value from function.  */
    for (i = 0; i < num_edges; i++)
      {
        edge e = INDEX_EDGE (el, i);
        if (((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_FAKE))
! 	   || e->dest == cfun->cfg->exit_block_ptr)
  	  && !EDGE_INFO (e)->ignore
  	  && (find_group (e->src) != find_group (e->dest)))
  	{
*************** find_spanning_tree (struct edge_list *el
*** 1263,1269 ****
  	}
      }
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
      bb->aux = NULL;
  }
  
--- 1263,1269 ----
  	}
      }
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
      bb->aux = NULL;
  }
  
Index: tree-ssa-phiopt.c
===================================================================
-c -L tree-ssa-phiopt.c	(revision 112224) -L tree-ssa-phiopt.c	(working copy) .svn/text-base/tree-ssa-phiopt.c.svn-base tree-ssa-phiopt.c
*** tree-ssa-phiopt.c	(revision 112224)
--- tree-ssa-phiopt.c	(working copy)
*************** blocks_in_phiopt_order (void)
*** 261,267 ****
  
    sbitmap_zero (visited);
  
!   MARK_VISITED (ENTRY_BLOCK_PTR);
    FOR_EACH_BB (x)
      {
        if (VISITED_P (x))
--- 261,267 ----
  
    sbitmap_zero (visited);
  
!   MARK_VISITED (cfun->cfg->entry_block_ptr);
    FOR_EACH_BB (x)
      {
        if (VISITED_P (x))
Index: rtl-factoring.c
===================================================================
-c -L rtl-factoring.c	(revision 112224) -L rtl-factoring.c	(working copy) .svn/text-base/rtl-factoring.c.svn-base rtl-factoring.c
*** rtl-factoring.c	(revision 112224)
--- rtl-factoring.c	(working copy)
*************** static rtx
*** 949,955 ****
  block_label_after (rtx insn)
  {
    basic_block bb = BLOCK_FOR_INSN (insn);
!   if ((insn == BB_END (bb)) && (bb->next_bb != EXIT_BLOCK_PTR))
      return block_label (bb->next_bb);
    else
      return block_label (split_block (bb, insn)->dest);
--- 949,955 ----
  block_label_after (rtx insn)
  {
    basic_block bb = BLOCK_FOR_INSN (insn);
!   if ((insn == BB_END (bb)) && (bb->next_bb != cfun->cfg->exit_block_ptr))
      return block_label (bb->next_bb);
    else
      return block_label (split_block (bb, insn)->dest);
Index: bt-load.c
===================================================================
-c -L bt-load.c	(revision 112224) -L bt-load.c	(working copy) .svn/text-base/bt-load.c.svn-base bt-load.c
*** bt-load.c	(revision 112224)
--- bt-load.c	(working copy)
*************** migrate_btr_def (btr_def def, int min_co
*** 1333,1339 ****
    def_basic_block_freq = basic_block_freq (def->bb);
  
    for (try = get_immediate_dominator (CDI_DOMINATORS, def->bb);
!        !give_up && try && try != ENTRY_BLOCK_PTR && def->cost >= min_cost;
         try = get_immediate_dominator (CDI_DOMINATORS, try))
      {
        /* Try to move the instruction that sets the target register into
--- 1333,1339 ----
    def_basic_block_freq = basic_block_freq (def->bb);
  
    for (try = get_immediate_dominator (CDI_DOMINATORS, def->bb);
!        !give_up && try && try != cfun->cfg->entry_block_ptr && def->cost >= min_cost;
         try = get_immediate_dominator (CDI_DOMINATORS, try))
      {
        /* Try to move the instruction that sets the target register into
Index: except.c
===================================================================
-c -L except.c	(revision 112224) -L except.c	(working copy) .svn/text-base/except.c.svn-base except.c
*** except.c	(revision 112224)
--- except.c	(working copy)
*************** sjlj_emit_function_enter (rtx dispatch_l
*** 1819,1825 ****
        }
  
    if (fn_begin_outside_block)
!     insert_insn_on_edge (seq, single_succ_edge (ENTRY_BLOCK_PTR));
    else
      emit_insn_after (seq, fn_begin);
  }
--- 1819,1825 ----
        }
  
    if (fn_begin_outside_block)
!     insert_insn_on_edge (seq, single_succ_edge (cfun->cfg->entry_block_ptr));
    else
      emit_insn_after (seq, fn_begin);
  }
*************** sjlj_emit_function_exit (void)
*** 1852,1858 ****
       post-dominates all can_throw_internal instructions.  This is
       the last possible moment.  */
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      if (e->flags & EDGE_FALLTHRU)
        break;
    if (e)
--- 1852,1858 ----
       post-dominates all can_throw_internal instructions.  This is
       the last possible moment.  */
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      if (e->flags & EDGE_FALLTHRU)
        break;
    if (e)
*************** sjlj_emit_function_exit (void)
*** 1862,1868 ****
        /* Figure out whether the place we are supposed to insert libcall
           is inside the last basic block or after it.  In the other case
           we need to emit to edge.  */
!       gcc_assert (e->src->next_bb == EXIT_BLOCK_PTR);
        for (insn = BB_HEAD (e->src); ; insn = NEXT_INSN (insn))
  	{
  	  if (insn == cfun->eh->sjlj_exit_after)
--- 1862,1868 ----
        /* Figure out whether the place we are supposed to insert libcall
           is inside the last basic block or after it.  In the other case
           we need to emit to edge.  */
!       gcc_assert (e->src->next_bb == cfun->cfg->exit_block_ptr);
        for (insn = BB_HEAD (e->src); ; insn = NEXT_INSN (insn))
  	{
  	  if (insn == cfun->eh->sjlj_exit_after)
Index: cfgexpand.c
===================================================================
-c -L cfgexpand.c	(revision 112224) -L cfgexpand.c	(working copy) .svn/text-base/cfgexpand.c.svn-base cfgexpand.c
*** cfgexpand.c	(revision 112224)
--- cfgexpand.c	(working copy)
*************** expand_gimple_tailcall (basic_block bb, 
*** 1216,1222 ****
      {
        if (!(e->flags & (EDGE_ABNORMAL | EDGE_EH)))
  	{
! 	  if (e->dest != EXIT_BLOCK_PTR)
  	    {
  	      e->dest->count -= e->count;
  	      e->dest->frequency -= EDGE_FREQUENCY (e);
--- 1216,1222 ----
      {
        if (!(e->flags & (EDGE_ABNORMAL | EDGE_EH)))
  	{
! 	  if (e->dest != cfun->cfg->exit_block_ptr)
  	    {
  	      e->dest->count -= e->count;
  	      e->dest->frequency -= EDGE_FREQUENCY (e);
*************** expand_gimple_tailcall (basic_block bb, 
*** 1252,1258 ****
        delete_insn (NEXT_INSN (last));
      }
  
!   e = make_edge (bb, EXIT_BLOCK_PTR, EDGE_ABNORMAL | EDGE_SIBCALL);
    e->probability += probability;
    e->count += count;
    BB_END (bb) = last;
--- 1252,1258 ----
        delete_insn (NEXT_INSN (last));
      }
  
!   e = make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_ABNORMAL | EDGE_SIBCALL);
    e->probability += probability;
    e->count += count;
    BB_END (bb) = last;
*************** construct_init_block (void)
*** 1398,1414 ****
    int flags;
  
    /* Multiple entry points not supported yet.  */
!   gcc_assert (EDGE_COUNT (ENTRY_BLOCK_PTR->succs) == 1);
!   init_rtl_bb_info (ENTRY_BLOCK_PTR);
!   init_rtl_bb_info (EXIT_BLOCK_PTR);
!   ENTRY_BLOCK_PTR->flags |= BB_RTL;
!   EXIT_BLOCK_PTR->flags |= BB_RTL;
  
!   e = EDGE_SUCC (ENTRY_BLOCK_PTR, 0);
  
    /* When entry edge points to first basic block, we don't need jump,
       otherwise we have to jump into proper target.  */
!   if (e && e->dest != ENTRY_BLOCK_PTR->next_bb)
      {
        tree label = tree_block_label (e->dest);
  
--- 1398,1414 ----
    int flags;
  
    /* Multiple entry points not supported yet.  */
!   gcc_assert (EDGE_COUNT (cfun->cfg->entry_block_ptr->succs) == 1);
!   init_rtl_bb_info (cfun->cfg->entry_block_ptr);
!   init_rtl_bb_info (cfun->cfg->exit_block_ptr);
!   cfun->cfg->entry_block_ptr->flags |= BB_RTL;
!   cfun->cfg->exit_block_ptr->flags |= BB_RTL;
  
!   e = EDGE_SUCC (cfun->cfg->entry_block_ptr, 0);
  
    /* When entry edge points to first basic block, we don't need jump,
       otherwise we have to jump into proper target.  */
!   if (e && e->dest != cfun->cfg->entry_block_ptr->next_bb)
      {
        tree label = tree_block_label (e->dest);
  
*************** construct_init_block (void)
*** 1420,1428 ****
  
    init_block = create_basic_block (NEXT_INSN (get_insns ()),
  				   get_last_insn (),
! 				   ENTRY_BLOCK_PTR);
!   init_block->frequency = ENTRY_BLOCK_PTR->frequency;
!   init_block->count = ENTRY_BLOCK_PTR->count;
    if (e)
      {
        first_block = e->dest;
--- 1420,1428 ----
  
    init_block = create_basic_block (NEXT_INSN (get_insns ()),
  				   get_last_insn (),
! 				   cfun->cfg->entry_block_ptr);
!   init_block->frequency = cfun->cfg->entry_block_ptr->frequency;
!   init_block->count = cfun->cfg->entry_block_ptr->count;
    if (e)
      {
        first_block = e->dest;
*************** construct_init_block (void)
*** 1430,1438 ****
        e = make_edge (init_block, first_block, flags);
      }
    else
!     e = make_edge (init_block, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
    e->probability = REG_BR_PROB_BASE;
!   e->count = ENTRY_BLOCK_PTR->count;
  
    update_bb_for_insn (init_block);
    return init_block;
--- 1430,1438 ----
        e = make_edge (init_block, first_block, flags);
      }
    else
!     e = make_edge (init_block, cfun->cfg->exit_block_ptr, EDGE_FALLTHRU);
    e->probability = REG_BR_PROB_BASE;
!   e->count = cfun->cfg->entry_block_ptr->count;
  
    update_bb_for_insn (init_block);
    return init_block;
*************** construct_exit_block (void)
*** 1472,1495 ****
    while (NEXT_INSN (head) && NOTE_P (NEXT_INSN (head)))
      head = NEXT_INSN (head);
    exit_block = create_basic_block (NEXT_INSN (head), end,
! 				   EXIT_BLOCK_PTR->prev_bb);
!   exit_block->frequency = EXIT_BLOCK_PTR->frequency;
!   exit_block->count = EXIT_BLOCK_PTR->count;
  
    ix = 0;
!   while (ix < EDGE_COUNT (EXIT_BLOCK_PTR->preds))
      {
!       e = EDGE_PRED (EXIT_BLOCK_PTR, ix);
        if (!(e->flags & EDGE_ABNORMAL))
  	redirect_edge_succ (e, exit_block);
        else
  	ix++;
      }
  
!   e = make_edge (exit_block, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
    e->probability = REG_BR_PROB_BASE;
!   e->count = EXIT_BLOCK_PTR->count;
!   FOR_EACH_EDGE (e2, ei, EXIT_BLOCK_PTR->preds)
      if (e2 != e)
        {
          e->count -= e2->count;
--- 1472,1495 ----
    while (NEXT_INSN (head) && NOTE_P (NEXT_INSN (head)))
      head = NEXT_INSN (head);
    exit_block = create_basic_block (NEXT_INSN (head), end,
! 				   cfun->cfg->exit_block_ptr->prev_bb);
!   exit_block->frequency = cfun->cfg->exit_block_ptr->frequency;
!   exit_block->count = cfun->cfg->exit_block_ptr->count;
  
    ix = 0;
!   while (ix < EDGE_COUNT (cfun->cfg->exit_block_ptr->preds))
      {
!       e = EDGE_PRED (cfun->cfg->exit_block_ptr, ix);
        if (!(e->flags & EDGE_ABNORMAL))
  	redirect_edge_succ (e, exit_block);
        else
  	ix++;
      }
  
!   e = make_edge (exit_block, cfun->cfg->exit_block_ptr, EDGE_FALLTHRU);
    e->probability = REG_BR_PROB_BASE;
!   e->count = cfun->cfg->exit_block_ptr->count;
!   FOR_EACH_EDGE (e2, ei, cfun->cfg->exit_block_ptr->preds)
      if (e2 != e)
        {
          e->count -= e2->count;
*************** tree_expand_cfg (void)
*** 1623,1629 ****
  
    init_block = construct_init_block ();
  
!   FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
      bb = expand_gimple_basic_block (bb);
  
    construct_exit_block ();
--- 1623,1629 ----
  
    init_block = construct_init_block ();
  
!   FOR_BB_BETWEEN (bb, init_block->next_bb, cfun->cfg->exit_block_ptr, next_bb)
      bb = expand_gimple_basic_block (bb);
  
    construct_exit_block ();
Index: tree-cfgcleanup.c
===================================================================
-c -L tree-cfgcleanup.c	(revision 112224) -L tree-cfgcleanup.c	(working copy) .svn/text-base/tree-cfgcleanup.c.svn-base tree-cfgcleanup.c
*** tree-cfgcleanup.c	(revision 112224)
--- tree-cfgcleanup.c	(working copy)
*************** cleanup_control_flow (void)
*** 233,239 ****
     the start of the successor block.
  
     As a precondition, we require that BB be not equal to
!    ENTRY_BLOCK_PTR.  */
  
  static bool
  tree_forwarder_block_p (basic_block bb, bool phi_wanted)
--- 233,239 ----
     the start of the successor block.
  
     As a precondition, we require that BB be not equal to
!    cfun->cfg->entry_block_ptr.  */
  
  static bool
  tree_forwarder_block_p (basic_block bb, bool phi_wanted)
*************** tree_forwarder_block_p (basic_block bb, 
*** 245,252 ****
        /* If PHI_WANTED is false, BB must not have any PHI nodes.
  	 Otherwise, BB must have PHI nodes.  */
        || (phi_nodes (bb) != NULL_TREE) != phi_wanted
!       /* BB may not be a predecessor of EXIT_BLOCK_PTR.  */
!       || single_succ (bb) == EXIT_BLOCK_PTR
        /* Nor should this be an infinite loop.  */
        || single_succ (bb) == bb
        /* BB may not have an abnormal outgoing edge.  */
--- 245,252 ----
        /* If PHI_WANTED is false, BB must not have any PHI nodes.
  	 Otherwise, BB must have PHI nodes.  */
        || (phi_nodes (bb) != NULL_TREE) != phi_wanted
!       /* BB may not be a predecessor of cfun->cfg->exit_block_ptr.  */
!       || single_succ (bb) == cfun->cfg->exit_block_ptr
        /* Nor should this be an infinite loop.  */
        || single_succ (bb) == bb
        /* BB may not have an abnormal outgoing edge.  */
*************** tree_forwarder_block_p (basic_block bb, 
*** 254,260 ****
      return false;
  
  #if ENABLE_CHECKING
!   gcc_assert (bb != ENTRY_BLOCK_PTR);
  #endif
  
    /* Now walk through the statements backward.  We can ignore labels,
--- 254,260 ----
      return false;
  
  #if ENABLE_CHECKING
!   gcc_assert (bb != cfun->cfg->entry_block_ptr);
  #endif
  
    /* Now walk through the statements backward.  We can ignore labels,
*************** tree_forwarder_block_p (basic_block bb, 
*** 275,281 ****
  	}
      }
  
!   if (find_edge (ENTRY_BLOCK_PTR, bb))
      return false;
  
    if (current_loops)
--- 275,281 ----
  	}
      }
  
!   if (find_edge (cfun->cfg->entry_block_ptr, bb))
      return false;
  
    if (current_loops)
Index: tree-ssa-pre.c
===================================================================
-c -L tree-ssa-pre.c	(revision 112224) -L tree-ssa-pre.c	(working copy) .svn/text-base/tree-ssa-pre.c.svn-base tree-ssa-pre.c
*** tree-ssa-pre.c	(revision 112224)
--- tree-ssa-pre.c	(working copy)
*************** compute_antic (void)
*** 1726,1738 ****
        ANTIC_IN (block) = set_new (true);
      }
    /* At the exit block we anticipate nothing.  */
!   ANTIC_IN (EXIT_BLOCK_PTR) = set_new (true);
  
    while (changed)
      {
        num_iterations++;
        changed = false;
!       changed = compute_antic_aux (EXIT_BLOCK_PTR, false);
      }
  
    sbitmap_free (has_abnormal_preds);
--- 1726,1738 ----
        ANTIC_IN (block) = set_new (true);
      }
    /* At the exit block we anticipate nothing.  */
!   ANTIC_IN (cfun->cfg->exit_block_ptr) = set_new (true);
  
    while (changed)
      {
        num_iterations++;
        changed = false;
!       changed = compute_antic_aux (cfun->cfg->exit_block_ptr, false);
      }
  
    sbitmap_free (has_abnormal_preds);
*************** compute_rvuse_and_antic_safe (void)
*** 1895,1901 ****
        tree name = ssa_name (i);
        if (name && !is_gimple_reg (name)
  	  && IS_EMPTY_STMT (SSA_NAME_DEF_STMT (name)))
! 	bitmap_set_bit (RVUSE_OUT (ENTRY_BLOCK_PTR),
  			SSA_NAME_VERSION (name));
      }
  
--- 1895,1901 ----
        tree name = ssa_name (i);
        if (name && !is_gimple_reg (name)
  	  && IS_EMPTY_STMT (SSA_NAME_DEF_STMT (name)))
! 	bitmap_set_bit (RVUSE_OUT (cfun->cfg->entry_block_ptr),
  			SSA_NAME_VERSION (name));
      }
  
*************** insert (void)
*** 2714,2720 ****
      {
        num_iterations++;
        new_stuff = false;
!       new_stuff = insert_aux (ENTRY_BLOCK_PTR);
      }
    if (num_iterations > 2 && dump_file && (dump_flags & TDF_STATS))
      fprintf (dump_file, "insert required %d iterations\n", num_iterations);
--- 2714,2720 ----
      {
        num_iterations++;
        new_stuff = false;
!       new_stuff = insert_aux (cfun->cfg->entry_block_ptr);
      }
    if (num_iterations > 2 && dump_file && (dump_flags & TDF_STATS))
      fprintf (dump_file, "insert required %d iterations\n", num_iterations);
*************** compute_avail (void)
*** 3258,3265 ****
  	{
  	  tree def = default_def (param);
  	  vn_lookup_or_add (def, NULL);
! 	  bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
! 	  bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def);
  	}
      }
  
--- 3258,3265 ----
  	{
  	  tree def = default_def (param);
  	  vn_lookup_or_add (def, NULL);
! 	  bitmap_insert_into_set (TMP_GEN (cfun->cfg->entry_block_ptr), def);
! 	  bitmap_value_insert_into_set (AVAIL_OUT (cfun->cfg->entry_block_ptr), def);
  	}
      }
  
*************** compute_avail (void)
*** 3271,3278 ****
          {
            tree def = default_def (param);
            vn_lookup_or_add (def, NULL);
!           bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
!           bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR), def);
          }
      }
  
--- 3271,3278 ----
          {
            tree def = default_def (param);
            vn_lookup_or_add (def, NULL);
!           bitmap_insert_into_set (TMP_GEN (cfun->cfg->entry_block_ptr), def);
!           bitmap_value_insert_into_set (AVAIL_OUT (cfun->cfg->entry_block_ptr), def);
          }
      }
  
*************** compute_avail (void)
*** 3281,3287 ****
  
    /* Seed the algorithm by putting the dominator children of the entry
       block on the worklist.  */
!   for (son = first_dom_son (CDI_DOMINATORS, ENTRY_BLOCK_PTR);
         son;
         son = next_dom_son (CDI_DOMINATORS, son))
      worklist[sp++] = son;
--- 3281,3287 ----
  
    /* Seed the algorithm by putting the dominator children of the entry
       block on the worklist.  */
!   for (son = first_dom_son (CDI_DOMINATORS, cfun->cfg->entry_block_ptr);
         son;
         son = next_dom_son (CDI_DOMINATORS, son))
      worklist[sp++] = son;
*************** init_pre (bool do_fre)
*** 3624,3635 ****
       nodes will have arguments coming from block -1.  This creates
       problems for several places in PRE that keep local arrays indexed
       by block number.  To prevent this, we split the edge coming from
!      ENTRY_BLOCK_PTR (FIXME, if ENTRY_BLOCK_PTR had an index number
       different than -1 we wouldn't have to hack this.  tree-ssa-dce.c
       needs a similar change).  */
!   if (!single_pred_p (single_succ (ENTRY_BLOCK_PTR)))
!     if (!(single_succ_edge (ENTRY_BLOCK_PTR)->flags & EDGE_ABNORMAL))
!       split_edge (single_succ_edge (ENTRY_BLOCK_PTR));
  
    FOR_ALL_BB (bb)
      bb->aux = xcalloc (1, sizeof (struct bb_value_sets));
--- 3624,3635 ----
       nodes will have arguments coming from block -1.  This creates
       problems for several places in PRE that keep local arrays indexed
       by block number.  To prevent this, we split the edge coming from
!      cfun->cfg->entry_block_ptr (FIXME, if cfun->cfg->entry_block_ptr had an index number
       different than -1 we wouldn't have to hack this.  tree-ssa-dce.c
       needs a similar change).  */
!   if (!single_pred_p (single_succ (cfun->cfg->entry_block_ptr)))
!     if (!(single_succ_edge (cfun->cfg->entry_block_ptr)->flags & EDGE_ABNORMAL))
!       split_edge (single_succ_edge (cfun->cfg->entry_block_ptr));
  
    FOR_ALL_BB (bb)
      bb->aux = xcalloc (1, sizeof (struct bb_value_sets));
Index: cfgcleanup.c
===================================================================
-c -L cfgcleanup.c	(revision 112224) -L cfgcleanup.c	(working copy) .svn/text-base/cfgcleanup.c.svn-base cfgcleanup.c
*** cfgcleanup.c	(revision 112224)
--- cfgcleanup.c	(working copy)
*************** try_simplify_condjump (basic_block cbran
*** 127,133 ****
       unconditional jump.  */
    jump_block = cbranch_fallthru_edge->dest;
    if (!single_pred_p (jump_block)
!       || jump_block->next_bb == EXIT_BLOCK_PTR
        || !FORWARDER_BLOCK_P (jump_block))
      return false;
    jump_dest_block = single_succ (jump_block);
--- 127,133 ----
       unconditional jump.  */
    jump_block = cbranch_fallthru_edge->dest;
    if (!single_pred_p (jump_block)
!       || jump_block->next_bb == cfun->cfg->exit_block_ptr
        || !FORWARDER_BLOCK_P (jump_block))
      return false;
    jump_dest_block = single_succ (jump_block);
*************** try_simplify_condjump (basic_block cbran
*** 150,156 ****
       unconditional branch.  */
    cbranch_dest_block = cbranch_jump_edge->dest;
  
!   if (cbranch_dest_block == EXIT_BLOCK_PTR
        || !can_fallthru (jump_block, cbranch_dest_block))
      return false;
  
--- 150,156 ----
       unconditional branch.  */
    cbranch_dest_block = cbranch_jump_edge->dest;
  
!   if (cbranch_dest_block == cfun->cfg->exit_block_ptr
        || !can_fallthru (jump_block, cbranch_dest_block))
      return false;
  
*************** try_forward_edges (int mode, basic_block
*** 456,462 ****
  	 bb-reorder.c:partition_hot_cold_basic_blocks for complete
  	 details.  */
  
!       if (first != EXIT_BLOCK_PTR
  	  && find_reg_note (BB_END (first), REG_CROSSING_JUMP, NULL_RTX))
  	return false;
  
--- 456,462 ----
  	 bb-reorder.c:partition_hot_cold_basic_blocks for complete
  	 details.  */
  
!       if (first != cfun->cfg->exit_block_ptr
  	  && find_reg_note (BB_END (first), REG_CROSSING_JUMP, NULL_RTX))
  	return false;
  
*************** try_forward_edges (int mode, basic_block
*** 468,474 ****
  
  	  if (FORWARDER_BLOCK_P (target)
    	      && !(single_succ_edge (target)->flags & EDGE_CROSSING)
! 	      && single_succ (target) != EXIT_BLOCK_PTR)
  	    {
  	      /* Bypass trivial infinite loops.  */
  	      new_target = single_succ (target);
--- 468,474 ----
  
  	  if (FORWARDER_BLOCK_P (target)
    	      && !(single_succ_edge (target)->flags & EDGE_CROSSING)
! 	      && single_succ (target) != cfun->cfg->exit_block_ptr)
  	    {
  	      /* Bypass trivial infinite loops.  */
  	      new_target = single_succ (target);
*************** try_forward_edges (int mode, basic_block
*** 538,544 ****
  	  int n = 0;
  
  	  /* Don't force if target is exit block.  */
! 	  if (threaded && target != EXIT_BLOCK_PTR)
  	    {
  	      notice_new_block (redirect_edge_and_branch_force (e, target));
  	      if (dump_file)
--- 538,544 ----
  	  int n = 0;
  
  	  /* Don't force if target is exit block.  */
! 	  if (threaded && target != cfun->cfg->exit_block_ptr)
  	    {
  	      notice_new_block (redirect_edge_and_branch_force (e, target));
  	      if (dump_file)
*************** merge_blocks_move (edge e, basic_block b
*** 776,782 ****
  	fprintf (dump_file, "Merged %d and %d without moving.\n",
  		 b_index, c_index);
  
!       return b->prev_bb == ENTRY_BLOCK_PTR ? b : b->prev_bb;
      }
  
    /* Otherwise we will need to move code around.  Do that only if expensive
--- 776,782 ----
  	fprintf (dump_file, "Merged %d and %d without moving.\n",
  		 b_index, c_index);
  
!       return b->prev_bb == cfun->cfg->entry_block_ptr ? b : b->prev_bb;
      }
  
    /* Otherwise we will need to move code around.  Do that only if expensive
*************** merge_blocks_move (edge e, basic_block b
*** 821,827 ****
        if (! c_has_outgoing_fallthru)
  	{
  	  merge_blocks_move_successor_nojumps (b, c);
!           return next == ENTRY_BLOCK_PTR ? next->next_bb : next;
  	}
  
        /* If B does not have an incoming fallthru, then it can be moved
--- 821,827 ----
        if (! c_has_outgoing_fallthru)
  	{
  	  merge_blocks_move_successor_nojumps (b, c);
!           return next == cfun->cfg->entry_block_ptr ? next->next_bb : next;
  	}
  
        /* If B does not have an incoming fallthru, then it can be moved
*************** merge_blocks_move (edge e, basic_block b
*** 833,839 ****
  	{
  	  basic_block bb;
  
! 	  if (b_fallthru_edge->src == ENTRY_BLOCK_PTR)
  	    return NULL;
  	  bb = force_nonfallthru (b_fallthru_edge);
  	  if (bb)
--- 833,839 ----
  	{
  	  basic_block bb;
  
! 	  if (b_fallthru_edge->src == cfun->cfg->entry_block_ptr)
  	    return NULL;
  	  bb = force_nonfallthru (b_fallthru_edge);
  	  if (bb)
*************** merge_blocks_move (edge e, basic_block b
*** 841,847 ****
  	}
  
        merge_blocks_move_predecessor_nojumps (b, c);
!       return next == ENTRY_BLOCK_PTR ? next->next_bb : next;
      }
  
    return NULL;
--- 841,847 ----
  	}
  
        merge_blocks_move_predecessor_nojumps (b, c);
!       return next == cfun->cfg->entry_block_ptr ? next->next_bb : next;
      }
  
    return NULL;
*************** try_crossjump_to_edge (int mode, edge e1
*** 1633,1639 ****
      e2 = single_pred_edge (src2), src2 = e2->src;
  
    /* Nothing to do if we reach ENTRY, or a common source block.  */
!   if (src1 == ENTRY_BLOCK_PTR || src2 == ENTRY_BLOCK_PTR)
      return false;
    if (src1 == src2)
      return false;
--- 1633,1639 ----
      e2 = single_pred_edge (src2), src2 = e2->src;
  
    /* Nothing to do if we reach ENTRY, or a common source block.  */
!   if (src1 == cfun->cfg->entry_block_ptr || src2 == cfun->cfg->entry_block_ptr)
      return false;
    if (src1 == src2)
      return false;
*************** try_crossjump_bb (int mode, basic_block 
*** 1833,1839 ****
    /* Don't crossjump if this block ends in a computed jump,
       unless we are optimizing for size.  */
    if (!optimize_size
!       && bb != EXIT_BLOCK_PTR
        && computed_jump_p (BB_END (bb)))
      return false;
  
--- 1833,1839 ----
    /* Don't crossjump if this block ends in a computed jump,
       unless we are optimizing for size.  */
    if (!optimize_size
!       && bb != cfun->cfg->exit_block_ptr
        && computed_jump_p (BB_END (bb)))
      return false;
  
*************** try_optimize_cfg (int mode)
*** 1986,1992 ****
  		     "\n\ntry_optimize_cfg iteration %i\n\n",
  		     iterations);
  
! 	  for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR;)
  	    {
  	      basic_block c;
  	      edge s;
--- 1986,1992 ----
  		     "\n\ntry_optimize_cfg iteration %i\n\n",
  		     iterations);
  
! 	  for (b = cfun->cfg->entry_block_ptr->next_bb; b != cfun->cfg->exit_block_ptr;)
  	    {
  	      basic_block c;
  	      edge s;
*************** try_optimize_cfg (int mode)
*** 2017,2023 ****
  		     if CASE_DROPS_THRU, this can be a tablejump with
  		     some element going to the same place as the
  		     default (fallthru).  */
! 		  && (single_pred (b) == ENTRY_BLOCK_PTR
  		      || !JUMP_P (BB_END (single_pred (b)))
  		      || ! label_is_jump_target_p (BB_HEAD (b),
  						   BB_END (single_pred (b)))))
--- 2017,2023 ----
  		     if CASE_DROPS_THRU, this can be a tablejump with
  		     some element going to the same place as the
  		     default (fallthru).  */
! 		  && (single_pred (b) == cfun->cfg->entry_block_ptr
  		      || !JUMP_P (BB_END (single_pred (b)))
  		      || ! label_is_jump_target_p (BB_HEAD (b),
  						   BB_END (single_pred (b)))))
*************** try_optimize_cfg (int mode)
*** 2055,2061 ****
  			     "Deleting fallthru block %i.\n",
  			     b->index);
  
! 		  c = b->prev_bb == ENTRY_BLOCK_PTR ? b->next_bb : b->prev_bb;
  		  redirect_edge_succ_nodup (single_pred_edge (b),
  					    single_succ (b));
  		  delete_basic_block (b);
--- 2055,2061 ----
  			     "Deleting fallthru block %i.\n",
  			     b->index);
  
! 		  c = b->prev_bb == cfun->cfg->entry_block_ptr ? b->next_bb : b->prev_bb;
  		  redirect_edge_succ_nodup (single_pred_edge (b),
  					    single_succ (b));
  		  delete_basic_block (b);
*************** try_optimize_cfg (int mode)
*** 2066,2072 ****
  	      if (single_succ_p (b)
  		  && (s = single_succ_edge (b))
  		  && !(s->flags & EDGE_COMPLEX)
! 		  && (c = s->dest) != EXIT_BLOCK_PTR
  		  && single_pred_p (c)
  		  && b != c)
  		{
--- 2066,2072 ----
  	      if (single_succ_p (b)
  		  && (s = single_succ_edge (b))
  		  && !(s->flags & EDGE_COMPLEX)
! 		  && (c = s->dest) != cfun->cfg->exit_block_ptr
  		  && single_pred_p (c)
  		  && b != c)
  		{
*************** try_optimize_cfg (int mode)
*** 2110,2116 ****
  		 can either delete the jump entirely, or replace it
  		 with a simple unconditional jump.  */
  	      if (single_succ_p (b)
! 		  && single_succ (b) != EXIT_BLOCK_PTR
  		  && onlyjump_p (BB_END (b))
  		  && !find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX)
  		  && try_redirect_by_replacing_jump (single_succ_edge (b),
--- 2110,2116 ----
  		 can either delete the jump entirely, or replace it
  		 with a simple unconditional jump.  */
  	      if (single_succ_p (b)
! 		  && single_succ (b) != cfun->cfg->exit_block_ptr
  		  && onlyjump_p (BB_END (b))
  		  && !find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX)
  		  && try_redirect_by_replacing_jump (single_succ_edge (b),
*************** try_optimize_cfg (int mode)
*** 2139,2145 ****
  	    }
  
  	  if ((mode & CLEANUP_CROSSJUMP)
! 	      && try_crossjump_bb (mode, EXIT_BLOCK_PTR))
  	    changed = true;
  
  #ifdef ENABLE_CHECKING
--- 2139,2145 ----
  	    }
  
  	  if ((mode & CLEANUP_CROSSJUMP)
! 	      && try_crossjump_bb (mode, cfun->cfg->exit_block_ptr))
  	    changed = true;
  
  #ifdef ENABLE_CHECKING
*************** delete_unreachable_blocks (void)
*** 2174,2180 ****
  
    /* Delete all unreachable basic blocks.  */
  
!   for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR; b = next_bb)
      {
        next_bb = b->next_bb;
  
--- 2174,2180 ----
  
    /* Delete all unreachable basic blocks.  */
  
!   for (b = cfun->cfg->entry_block_ptr->next_bb; b != cfun->cfg->exit_block_ptr; b = next_bb)
      {
        next_bb = b->next_bb;
  
*************** merge_seq_blocks (void)
*** 2198,2204 ****
    basic_block bb;
    bool changed = false;
  
!   for (bb = ENTRY_BLOCK_PTR->next_bb; bb != EXIT_BLOCK_PTR; )
      {
        if (single_succ_p (bb)
  	  && can_merge_blocks_p (bb, single_succ (bb)))
--- 2198,2204 ----
    basic_block bb;
    bool changed = false;
  
!   for (bb = cfun->cfg->entry_block_ptr->next_bb; bb != cfun->cfg->exit_block_ptr; )
      {
        if (single_succ_p (bb)
  	  && can_merge_blocks_p (bb, single_succ (bb)))
Index: tree-ssa-live.c
===================================================================
-c -L tree-ssa-live.c	(revision 112224) -L tree-ssa-live.c	(working copy) .svn/text-base/tree-ssa-live.c.svn-base tree-ssa-live.c
*** tree-ssa-live.c	(revision 112224)
--- tree-ssa-live.c	(working copy)
*************** live_worklist (tree_live_info_p live, in
*** 588,594 ****
        b = *--tos;
  
        FOR_EACH_EDGE (e, ei, BASIC_BLOCK (b)->preds)
! 	if (e->src != ENTRY_BLOCK_PTR)
  	  {
  	    /* Its not live on entry to the block its defined in.  */
  	    if (e->src == def_bb)
--- 588,594 ----
        b = *--tos;
  
        FOR_EACH_EDGE (e, ei, BASIC_BLOCK (b)->preds)
! 	if (e->src != cfun->cfg->entry_block_ptr)
  	  {
  	    /* Its not live on entry to the block its defined in.  */
  	    if (e->src == def_bb)
*************** add_livein_if_notdef (tree_live_info_p l
*** 622,628 ****
  		      tree var, basic_block bb)
  {
    int p = var_to_partition (live->map, var);
!   if (p == NO_PARTITION || bb == ENTRY_BLOCK_PTR)
      return;
    if (!bitmap_bit_p (def_vec, p))
      {
--- 622,628 ----
  		      tree var, basic_block bb)
  {
    int p = var_to_partition (live->map, var);
!   if (p == NO_PARTITION || bb == cfun->cfg->entry_block_ptr)
      return;
    if (!bitmap_bit_p (def_vec, p))
      {
*************** calculate_live_on_entry (var_map map)
*** 721,732 ****
        the program. This will typically mean an optimization has done
        something wrong.  */
  
!   bb = ENTRY_BLOCK_PTR;
    num = 0;
    FOR_EACH_EDGE (e, ei, bb->succs)
      {
        int entry_block = e->dest->index;
!       if (e->dest == EXIT_BLOCK_PTR)
          continue;
        for (i = 0; i < (unsigned)num_var_partitions (map); i++)
  	{
--- 721,732 ----
        the program. This will typically mean an optimization has done
        something wrong.  */
  
!   bb = cfun->cfg->entry_block_ptr;
    num = 0;
    FOR_EACH_EDGE (e, ei, bb->succs)
      {
        int entry_block = e->dest->index;
!       if (e->dest == cfun->cfg->exit_block_ptr)
          continue;
        for (i = 0; i < (unsigned)num_var_partitions (map); i++)
  	{
*************** calculate_live_on_exit (tree_live_info_p
*** 832,838 ****
  	  { 
  	    t = PHI_ARG_DEF (phi, i);
  	    e = PHI_ARG_EDGE (phi, i);
! 	    if (!phi_ssa_name_p (t) || e->src == ENTRY_BLOCK_PTR)
  	      continue;
  	    set_if_valid (map, on_exit[e->src->index], t);
  	  }
--- 832,838 ----
  	  { 
  	    t = PHI_ARG_DEF (phi, i);
  	    e = PHI_ARG_EDGE (phi, i);
! 	    if (!phi_ssa_name_p (t) || e->src == cfun->cfg->entry_block_ptr)
  	      continue;
  	    set_if_valid (map, on_exit[e->src->index], t);
  	  }
*************** calculate_live_on_exit (tree_live_info_p
*** 848,854 ****
          {
  	  edge_iterator ei;
  	  FOR_EACH_EDGE (e, ei, BASIC_BLOCK (b)->preds)
! 	    if (e->src != ENTRY_BLOCK_PTR)
  	      bitmap_set_bit (on_exit[e->src->index], i);
  	}
      }
--- 848,854 ----
          {
  	  edge_iterator ei;
  	  FOR_EACH_EDGE (e, ei, BASIC_BLOCK (b)->preds)
! 	    if (e->src != cfun->cfg->entry_block_ptr)
  	      bitmap_set_bit (on_exit[e->src->index], i);
  	}
      }
Index: tree-sra.c
===================================================================
-c -L tree-sra.c	(revision 112224) -L tree-sra.c	(working copy) .svn/text-base/tree-sra.c.svn-base tree-sra.c
*** tree-sra.c	(revision 112224)
--- tree-sra.c	(working copy)
*************** scalarize_parms (void)
*** 2118,2124 ****
  
    if (list)
      {
!       insert_edge_copies (list, ENTRY_BLOCK_PTR);
        mark_all_v_defs (list);
      }
  }
--- 2118,2124 ----
  
    if (list)
      {
!       insert_edge_copies (list, cfun->cfg->entry_block_ptr);
        mark_all_v_defs (list);
      }
  }
Index: tree-ssa-live.h
===================================================================
-c -L tree-ssa-live.h	(revision 112224) -L tree-ssa-live.h	(working copy) .svn/text-base/tree-ssa-live.h.svn-base tree-ssa-live.h
*** tree-ssa-live.h	(revision 112224)
--- tree-ssa-live.h	(working copy)
*************** static inline bitmap
*** 286,293 ****
  live_on_exit (tree_live_info_p live, basic_block bb)
  {
    gcc_assert (live->liveout);
!   gcc_assert (bb != ENTRY_BLOCK_PTR);
!   gcc_assert (bb != EXIT_BLOCK_PTR);
  
    return live->liveout[bb->index];
  }
--- 286,293 ----
  live_on_exit (tree_live_info_p live, basic_block bb)
  {
    gcc_assert (live->liveout);
!   gcc_assert (bb != cfun->cfg->entry_block_ptr);
!   gcc_assert (bb != cfun->cfg->exit_block_ptr);
  
    return live->liveout[bb->index];
  }
Index: tree-mudflap.c
===================================================================
-c -L tree-mudflap.c	(revision 112224) -L tree-mudflap.c	(working copy) .svn/text-base/tree-mudflap.c.svn-base tree-mudflap.c
*** tree-mudflap.c	(revision 112224)
--- tree-mudflap.c	(working copy)
*************** mf_decl_cache_locals (void)
*** 467,482 ****
    mask_init_stmts = t;
  
    /* Anticipating multiple entry points, we insert the cache vars
!      initializers in each successor of the ENTRY_BLOCK_PTR.  */
    for (tsi = tsi_start (shift_init_stmts);
         ! tsi_end_p (tsi);
         tsi_next (&tsi))
!     insert_edge_copies (tsi_stmt (tsi), ENTRY_BLOCK_PTR);
  
    for (tsi = tsi_start (mask_init_stmts);
         ! tsi_end_p (tsi);
         tsi_next (&tsi))
!     insert_edge_copies (tsi_stmt (tsi), ENTRY_BLOCK_PTR);
    bsi_commit_edge_inserts ();
  }
  
--- 467,482 ----
    mask_init_stmts = t;
  
    /* Anticipating multiple entry points, we insert the cache vars
!      initializers in each successor of the cfun->cfg->entry_block_ptr.  */
    for (tsi = tsi_start (shift_init_stmts);
         ! tsi_end_p (tsi);
         tsi_next (&tsi))
!     insert_edge_copies (tsi_stmt (tsi), cfun->cfg->entry_block_ptr);
  
    for (tsi = tsi_start (mask_init_stmts);
         ! tsi_end_p (tsi);
         tsi_next (&tsi))
!     insert_edge_copies (tsi_stmt (tsi), cfun->cfg->entry_block_ptr);
    bsi_commit_edge_inserts ();
  }
  
*************** mf_xform_derefs (void)
*** 893,899 ****
    block_stmt_iterator i;
    int saved_last_basic_block = last_basic_block;
  
!   bb = ENTRY_BLOCK_PTR ->next_bb;
    do
      {
        next = bb->next_bb;
--- 893,899 ----
    block_stmt_iterator i;
    int saved_last_basic_block = last_basic_block;
  
!   bb = cfun->cfg->entry_block_ptr ->next_bb;
    do
      {
        next = bb->next_bb;
Index: loop-iv.c
===================================================================
-c -L loop-iv.c	(revision 112224) -L loop-iv.c	(working copy) .svn/text-base/loop-iv.c.svn-base loop-iv.c
*** loop-iv.c	(revision 112224)
--- loop-iv.c	(working copy)
*************** simplify_using_initial_values (struct lo
*** 1760,1766 ****
    gcc_assert (op == UNKNOWN);
  
    e = loop_preheader_edge (loop);
!   if (e->src == ENTRY_BLOCK_PTR)
      return;
  
    altered = ALLOC_REG_SET (&reg_obstack);
--- 1760,1766 ----
    gcc_assert (op == UNKNOWN);
  
    e = loop_preheader_edge (loop);
!   if (e->src == cfun->cfg->entry_block_ptr)
      return;
  
    altered = ALLOC_REG_SET (&reg_obstack);
*************** simplify_using_initial_values (struct lo
*** 1799,1805 ****
  	}
  
        if (!single_pred_p (e->src)
! 	  || single_pred (e->src) == ENTRY_BLOCK_PTR)
  	break;
        e = single_pred_edge (e->src);
      }
--- 1799,1805 ----
  	}
  
        if (!single_pred_p (e->src)
! 	  || single_pred (e->src) == cfun->cfg->entry_block_ptr)
  	break;
        e = single_pred_edge (e->src);
      }
Index: cfglayout.c
===================================================================
-c -L cfglayout.c	(revision 112224) -L cfglayout.c	(working copy) .svn/text-base/cfglayout.c.svn-base cfglayout.c
*** cfglayout.c	(revision 112224)
--- cfglayout.c	(working copy)
*************** skip_insns_after_block (basic_block bb)
*** 82,88 ****
    rtx insn, last_insn, next_head, prev;
  
    next_head = NULL_RTX;
!   if (bb->next_bb != EXIT_BLOCK_PTR)
      next_head = BB_HEAD (bb->next_bb);
  
    for (last_insn = insn = BB_END (bb); (insn = NEXT_INSN (insn)) != 0; )
--- 82,88 ----
    rtx insn, last_insn, next_head, prev;
  
    next_head = NULL_RTX;
!   if (bb->next_bb != cfun->cfg->exit_block_ptr)
      next_head = BB_HEAD (bb->next_bb);
  
    for (last_insn = insn = BB_END (bb); (insn = NEXT_INSN (insn)) != 0; )
*************** fixup_reorder_chain (void)
*** 602,608 ****
    /* First do the bulk reordering -- rechain the blocks without regard to
       the needed changes to jumps and labels.  */
  
!   for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS;
         bb != 0;
         bb = bb->aux, index++)
      {
--- 602,608 ----
    /* First do the bulk reordering -- rechain the blocks without regard to
       the needed changes to jumps and labels.  */
  
!   for (bb = cfun->cfg->entry_block_ptr->next_bb, index = NUM_FIXED_BLOCKS;
         bb != 0;
         bb = bb->aux, index++)
      {
*************** fixup_reorder_chain (void)
*** 650,656 ****
    /* Now add jumps and labels as needed to match the blocks new
       outgoing edges.  */
  
!   for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = bb->aux)
      {
        edge e_fall, e_taken, e;
        rtx bb_end_insn;
--- 650,656 ----
    /* Now add jumps and labels as needed to match the blocks new
       outgoing edges.  */
  
!   for (bb = cfun->cfg->entry_block_ptr->next_bb; bb ; bb = bb->aux)
      {
        edge e_fall, e_taken, e;
        rtx bb_end_insn;
*************** fixup_reorder_chain (void)
*** 677,683 ****
  	    {
  	      /* If the old fallthru is still next, nothing to do.  */
  	      if (bb->aux == e_fall->dest
! 	          || e_fall->dest == EXIT_BLOCK_PTR)
  		continue;
  
  	      /* The degenerated case of conditional jump jumping to the next
--- 677,683 ----
  	    {
  	      /* If the old fallthru is still next, nothing to do.  */
  	      if (bb->aux == e_fall->dest
! 	          || e_fall->dest == cfun->cfg->exit_block_ptr)
  		continue;
  
  	      /* The degenerated case of conditional jump jumping to the next
*************** fixup_reorder_chain (void)
*** 698,704 ****
  		  if (note
  		      && INTVAL (XEXP (note, 0)) < REG_BR_PROB_BASE / 2
  		      && invert_jump (bb_end_insn,
! 				      (e_fall->dest == EXIT_BLOCK_PTR
  				       ? NULL_RTX
  				       : label_for_bb (e_fall->dest)), 0))
  		    {
--- 698,704 ----
  		  if (note
  		      && INTVAL (XEXP (note, 0)) < REG_BR_PROB_BASE / 2
  		      && invert_jump (bb_end_insn,
! 				      (e_fall->dest == cfun->cfg->exit_block_ptr
  				       ? NULL_RTX
  				       : label_for_bb (e_fall->dest)), 0))
  		    {
*************** fixup_reorder_chain (void)
*** 722,728 ****
  	      /* Otherwise we can try to invert the jump.  This will
  		 basically never fail, however, keep up the pretense.  */
  	      else if (invert_jump (bb_end_insn,
! 				    (e_fall->dest == EXIT_BLOCK_PTR
  				     ? NULL_RTX
  				     : label_for_bb (e_fall->dest)), 0))
  		{
--- 722,728 ----
  	      /* Otherwise we can try to invert the jump.  This will
  		 basically never fail, however, keep up the pretense.  */
  	      else if (invert_jump (bb_end_insn,
! 				    (e_fall->dest == cfun->cfg->exit_block_ptr
  				     ? NULL_RTX
  				     : label_for_bb (e_fall->dest)), 0))
  		{
*************** fixup_reorder_chain (void)
*** 758,764 ****
  	    continue;
  
  	  /* A fallthru to exit block.  */
! 	  if (e_fall->dest == EXIT_BLOCK_PTR)
  	    continue;
  	}
  
--- 758,764 ----
  	    continue;
  
  	  /* A fallthru to exit block.  */
! 	  if (e_fall->dest == cfun->cfg->exit_block_ptr)
  	    continue;
  	}
  
*************** fixup_reorder_chain (void)
*** 791,797 ****
    if (dump_file)
      {
        fprintf (dump_file, "Reordered sequence:\n");
!       for (bb = ENTRY_BLOCK_PTR->next_bb, index = NUM_FIXED_BLOCKS;
  	   bb;
  	   bb = bb->aux, index++)
  	{
--- 791,797 ----
    if (dump_file)
      {
        fprintf (dump_file, "Reordered sequence:\n");
!       for (bb = cfun->cfg->entry_block_ptr->next_bb, index = NUM_FIXED_BLOCKS;
  	   bb;
  	   bb = bb->aux, index++)
  	{
*************** fixup_reorder_chain (void)
*** 808,815 ****
  	}
      }
  
!   prev_bb = ENTRY_BLOCK_PTR;
!   bb = ENTRY_BLOCK_PTR->next_bb;
    index = NUM_FIXED_BLOCKS;
  
    for (; bb; prev_bb = bb, bb = bb->aux, index ++)
--- 808,815 ----
  	}
      }
  
!   prev_bb = cfun->cfg->entry_block_ptr;
!   bb = cfun->cfg->entry_block_ptr->next_bb;
    index = NUM_FIXED_BLOCKS;
  
    for (; bb; prev_bb = bb, bb = bb->aux, index ++)
*************** fixup_reorder_chain (void)
*** 820,827 ****
        bb->prev_bb = prev_bb;
        prev_bb->next_bb = bb;
      }
!   prev_bb->next_bb = EXIT_BLOCK_PTR;
!   EXIT_BLOCK_PTR->prev_bb = prev_bb;
  
    /* Annoying special case - jump around dead jumptables left in the code.  */
    FOR_EACH_BB (bb)
--- 820,827 ----
        bb->prev_bb = prev_bb;
        prev_bb->next_bb = bb;
      }
!   prev_bb->next_bb = cfun->cfg->exit_block_ptr;
!   cfun->cfg->exit_block_ptr->prev_bb = prev_bb;
  
    /* Annoying special case - jump around dead jumptables left in the code.  */
    FOR_EACH_BB (bb)
*************** fixup_fallthru_exit_predecessor (void)
*** 880,892 ****
       value.  */
    gcc_assert (reload_completed);
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      if (e->flags & EDGE_FALLTHRU)
        bb = e->src;
  
    if (bb && bb->aux)
      {
!       basic_block c = ENTRY_BLOCK_PTR->next_bb;
  
        /* If the very first block is the one with the fall-through exit
  	 edge, we have to split that block.  */
--- 880,892 ----
       value.  */
    gcc_assert (reload_completed);
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      if (e->flags & EDGE_FALLTHRU)
        bb = e->src;
  
    if (bb && bb->aux)
      {
!       basic_block c = cfun->cfg->entry_block_ptr->next_bb;
  
        /* If the very first block is the one with the fall-through exit
  	 edge, we have to split that block.  */
*************** cfg_layout_duplicate_bb (basic_block bb)
*** 1044,1050 ****
    insn = duplicate_insn_chain (BB_HEAD (bb), BB_END (bb));
    new_bb = create_basic_block (insn,
  			       insn ? get_last_insn () : NULL,
! 			       EXIT_BLOCK_PTR->prev_bb);
  
    BB_COPY_PARTITION (new_bb, bb);
    if (bb->il.rtl->header)
--- 1044,1050 ----
    insn = duplicate_insn_chain (BB_HEAD (bb), BB_END (bb));
    new_bb = create_basic_block (insn,
  			       insn ? get_last_insn () : NULL,
! 			       cfun->cfg->exit_block_ptr->prev_bb);
  
    BB_COPY_PARTITION (new_bb, bb);
    if (bb->il.rtl->header)
*************** cfg_layout_finalize (void)
*** 1150,1156 ****
  #ifdef ENABLE_CHECKING
    verify_insn_chain ();
  #endif
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
    {
      bb->il.rtl->header = bb->il.rtl->footer = NULL;
      bb->aux = NULL;
--- 1150,1156 ----
  #ifdef ENABLE_CHECKING
    verify_insn_chain ();
  #endif
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, NULL, next_bb)
    {
      bb->il.rtl->header = bb->il.rtl->footer = NULL;
      bb->aux = NULL;
Index: tree-ssa-dce.c
===================================================================
-c -L tree-ssa-dce.c	(revision 112224) -L tree-ssa-dce.c	(working copy) .svn/text-base/tree-ssa-dce.c.svn-base tree-ssa-dce.c
*** tree-ssa-dce.c	(revision 112224)
--- tree-ssa-dce.c	(working copy)
*************** static void tree_dce_done (bool);
*** 140,148 ****
  static inline void
  set_control_dependence_map_bit (basic_block bb, int edge_index)
  {
!   if (bb == ENTRY_BLOCK_PTR)
      return;
!   gcc_assert (bb != EXIT_BLOCK_PTR);
    bitmap_set_bit (control_dependence_map[bb->index], edge_index);
  }
  
--- 140,148 ----
  static inline void
  set_control_dependence_map_bit (basic_block bb, int edge_index)
  {
!   if (bb == cfun->cfg->entry_block_ptr)
      return;
!   gcc_assert (bb != cfun->cfg->exit_block_ptr);
    bitmap_set_bit (control_dependence_map[bb->index], edge_index);
  }
  
*************** find_control_dependence (struct edge_lis
*** 174,188 ****
    basic_block current_block;
    basic_block ending_block;
  
!   gcc_assert (INDEX_EDGE_PRED_BB (el, edge_index) != EXIT_BLOCK_PTR);
  
!   if (INDEX_EDGE_PRED_BB (el, edge_index) == ENTRY_BLOCK_PTR)
!     ending_block = single_succ (ENTRY_BLOCK_PTR);
    else
      ending_block = find_pdom (INDEX_EDGE_PRED_BB (el, edge_index));
  
    for (current_block = INDEX_EDGE_SUCC_BB (el, edge_index);
!        current_block != ending_block && current_block != EXIT_BLOCK_PTR;
         current_block = find_pdom (current_block))
      {
        edge e = INDEX_EDGE (el, edge_index);
--- 174,188 ----
    basic_block current_block;
    basic_block ending_block;
  
!   gcc_assert (INDEX_EDGE_PRED_BB (el, edge_index) != cfun->cfg->exit_block_ptr);
  
!   if (INDEX_EDGE_PRED_BB (el, edge_index) == cfun->cfg->entry_block_ptr)
!     ending_block = single_succ (cfun->cfg->entry_block_ptr);
    else
      ending_block = find_pdom (INDEX_EDGE_PRED_BB (el, edge_index));
  
    for (current_block = INDEX_EDGE_SUCC_BB (el, edge_index);
!        current_block != ending_block && current_block != cfun->cfg->exit_block_ptr;
         current_block = find_pdom (current_block))
      {
        edge e = INDEX_EDGE (el, edge_index);
*************** find_control_dependence (struct edge_lis
*** 203,217 ****
  static inline basic_block
  find_pdom (basic_block block)
  {
!   gcc_assert (block != ENTRY_BLOCK_PTR);
  
!   if (block == EXIT_BLOCK_PTR)
!     return EXIT_BLOCK_PTR;
    else
      {
        basic_block bb = get_immediate_dominator (CDI_POST_DOMINATORS, block);
        if (! bb)
! 	return EXIT_BLOCK_PTR;
        return bb;
      }
  }
--- 203,217 ----
  static inline basic_block
  find_pdom (basic_block block)
  {
!   gcc_assert (block != cfun->cfg->entry_block_ptr);
  
!   if (block == cfun->cfg->exit_block_ptr)
!     return cfun->cfg->exit_block_ptr;
    else
      {
        basic_block bb = get_immediate_dominator (CDI_POST_DOMINATORS, block);
        if (! bb)
! 	return cfun->cfg->exit_block_ptr;
        return bb;
      }
  }
*************** mark_control_dependent_edges_necessary (
*** 441,449 ****
    bitmap_iterator bi;
    unsigned edge_number;
  
!   gcc_assert (bb != EXIT_BLOCK_PTR);
  
!   if (bb == ENTRY_BLOCK_PTR)
      return;
  
    EXECUTE_IF_CONTROL_DEPENDENT (bi, bb->index, edge_number)
--- 441,449 ----
    bitmap_iterator bi;
    unsigned edge_number;
  
!   gcc_assert (bb != cfun->cfg->exit_block_ptr);
  
!   if (bb == cfun->cfg->entry_block_ptr)
      return;
  
    EXECUTE_IF_CONTROL_DEPENDENT (bi, bb->index, edge_number)
*************** propagate_necessity (struct edge_list *e
*** 494,500 ****
  	     containing `i' is control dependent on, but only if we haven't
  	     already done so.  */
  	  basic_block bb = bb_for_stmt (i);
! 	  if (bb != ENTRY_BLOCK_PTR
  	      && ! TEST_BIT (visited_control_parents, bb->index))
  	    {
  	      SET_BIT (visited_control_parents, bb->index);
--- 494,500 ----
  	     containing `i' is control dependent on, but only if we haven't
  	     already done so.  */
  	  basic_block bb = bb_for_stmt (i);
! 	  if (bb != cfun->cfg->entry_block_ptr
  	      && ! TEST_BIT (visited_control_parents, bb->index))
  	    {
  	      SET_BIT (visited_control_parents, bb->index);
*************** propagate_necessity (struct edge_list *e
*** 523,529 ****
  	      for (k = 0; k < PHI_NUM_ARGS (i); k++)
  		{
  		  basic_block arg_bb = PHI_ARG_EDGE (i, k)->src;
! 		  if (arg_bb != ENTRY_BLOCK_PTR
  		      && ! TEST_BIT (visited_control_parents, arg_bb->index))
  		    {
  		      SET_BIT (visited_control_parents, arg_bb->index);
--- 523,529 ----
  	      for (k = 0; k < PHI_NUM_ARGS (i); k++)
  		{
  		  basic_block arg_bb = PHI_ARG_EDGE (i, k)->src;
! 		  if (arg_bb != cfun->cfg->entry_block_ptr
  		      && ! TEST_BIT (visited_control_parents, arg_bb->index))
  		    {
  		      SET_BIT (visited_control_parents, arg_bb->index);
*************** remove_dead_stmt (block_stmt_iterator *i
*** 748,754 ****
  	 as it may reference SSA_NAMEs which are going to be removed and
  	 we remove all but one outgoing edge from the block.  */
        if (! post_dom_bb
! 	  || post_dom_bb == EXIT_BLOCK_PTR
  	  || phi_nodes (post_dom_bb))
  	;
        else
--- 748,754 ----
  	 as it may reference SSA_NAMEs which are going to be removed and
  	 we remove all but one outgoing edge from the block.  */
        if (! post_dom_bb
! 	  || post_dom_bb == cfun->cfg->exit_block_ptr
  	  || phi_nodes (post_dom_bb))
  	;
        else
Index: varasm.c
===================================================================
-c -L varasm.c	(revision 112224) -L varasm.c	(working copy) .svn/text-base/varasm.c.svn-base varasm.c
*** varasm.c	(revision 112224)
--- varasm.c	(working copy)
*************** assemble_start_function (tree decl, cons
*** 1351,1357 ****
  	 align the hot section and write out the hot section label.
  	 But if the current function is a thunk, we do not have a CFG.  */
        if (!current_function_is_thunk
! 	  && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
  	{
  	  switch_to_section (text_section);
  	  assemble_align (FUNCTION_BOUNDARY);
--- 1351,1357 ----
  	 align the hot section and write out the hot section label.
  	 But if the current function is a thunk, we do not have a CFG.  */
        if (!current_function_is_thunk
! 	  && BB_PARTITION (cfun->cfg->entry_block_ptr->next_bb) == BB_COLD_PARTITION)
  	{
  	  switch_to_section (text_section);
  	  assemble_align (FUNCTION_BOUNDARY);
Index: lambda-code.c
===================================================================
-c -L lambda-code.c	(revision 112224) -L lambda-code.c	(working copy) .svn/text-base/lambda-code.c.svn-base lambda-code.c
*** lambda-code.c	(revision 112224)
--- lambda-code.c	(working copy)
*************** perfect_nestify (struct loops *loops,
*** 2366,2372 ****
  
    olddest = loop->single_exit->dest;
    preheaderbb =  loop_split_edge_with (loop->single_exit, NULL);
!   headerbb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
    
    /* Push the exit phi nodes that we are moving.  */
    for (phi = phi_nodes (olddest); phi; phi = PHI_CHAIN (phi))
--- 2366,2372 ----
  
    olddest = loop->single_exit->dest;
    preheaderbb =  loop_split_edge_with (loop->single_exit, NULL);
!   headerbb = create_empty_bb (cfun->cfg->exit_block_ptr->prev_bb);
    
    /* Push the exit phi nodes that we are moving.  */
    for (phi = phi_nodes (olddest); phi; phi = PHI_CHAIN (phi))
*************** perfect_nestify (struct loops *loops,
*** 2398,2405 ****
    flush_pending_stmts (e);
    VEC_free (tree, heap, phis);
  
!   bodybb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
!   latchbb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
    make_edge (headerbb, bodybb, EDGE_FALLTHRU); 
    then_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (latchbb));
    else_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (olddest));
--- 2398,2405 ----
    flush_pending_stmts (e);
    VEC_free (tree, heap, phis);
  
!   bodybb = create_empty_bb (cfun->cfg->exit_block_ptr->prev_bb);
!   latchbb = create_empty_bb (cfun->cfg->exit_block_ptr->prev_bb);
    make_edge (headerbb, bodybb, EDGE_FALLTHRU); 
    then_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (latchbb));
    else_label = build1 (GOTO_EXPR, void_type_node, tree_block_label (olddest));
Index: tree-inline.c
===================================================================
-c -L tree-inline.c	(revision 112224) -L tree-inline.c	(working copy) .svn/text-base/tree-inline.c.svn-base tree-inline.c
*** tree-inline.c	(revision 112224)
--- tree-inline.c	(working copy)
*************** copy_edges_for_bb (basic_block bb, int c
*** 786,792 ****
  
  	/* Return edges do get a FALLTHRU flag when the get inlined.  */
  	if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags
! 	    && old_edge->dest->aux != EXIT_BLOCK_PTR)
  	  flags |= EDGE_FALLTHRU;
  	new = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
  	new->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
--- 786,792 ----
  
  	/* Return edges do get a FALLTHRU flag when the get inlined.  */
  	if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags
! 	    && old_edge->dest->aux != cfun->cfg->exit_block_ptr)
  	  flags |= EDGE_FALLTHRU;
  	new = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
  	new->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
*************** copy_cfg_body (copy_body_data * id, gcov
*** 860,875 ****
    tree new_fndecl = NULL;
    int count_scale, frequency_scale;
  
!   if (ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count)
      count_scale = (REG_BR_PROB_BASE * count
! 		   / ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count);
    else
      count_scale = 1;
  
!   if (ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->frequency)
      frequency_scale = (REG_BR_PROB_BASE * frequency
  		       /
! 		       ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->frequency);
    else
      frequency_scale = count_scale;
  
--- 860,875 ----
    tree new_fndecl = NULL;
    int count_scale, frequency_scale;
  
!   if (src_cfun->cfg->entry_block_ptr->count)
      count_scale = (REG_BR_PROB_BASE * count
! 		   / src_cfun->cfg->entry_block_ptr->count);
    else
      count_scale = 1;
  
!   if (src_cfun->cfg->entry_block_ptr->frequency)
      frequency_scale = (REG_BR_PROB_BASE * frequency
  		       /
! 		       src_cfun->cfg->entry_block_ptr->frequency);
    else
      frequency_scale = count_scale;
  
*************** copy_cfg_body (copy_body_data * id, gcov
*** 877,884 ****
    tree_register_cfg_hooks ();
  
    /* Must have a CFG here at this point.  */
!   gcc_assert (ENTRY_BLOCK_PTR_FOR_FUNCTION
! 	      (DECL_STRUCT_FUNCTION (callee_fndecl)));
  
    *cfun_to_copy = *DECL_STRUCT_FUNCTION (callee_fndecl);
  
--- 877,883 ----
    tree_register_cfg_hooks ();
  
    /* Must have a CFG here at this point.  */
!   gcc_assert (DECL_STRUCT_FUNCTION (callee_fndecl)->cfg->entry_block_ptr);
  
    *cfun_to_copy = *DECL_STRUCT_FUNCTION (callee_fndecl);
  
*************** copy_cfg_body (copy_body_data * id, gcov
*** 898,922 ****
        push_cfun (new_cfun);
        init_empty_tree_cfg ();
  
!       ENTRY_BLOCK_PTR->count =
! 	(ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count * count_scale /
  	 REG_BR_PROB_BASE);
!       ENTRY_BLOCK_PTR->frequency =
! 	(ENTRY_BLOCK_PTR_FOR_FUNCTION (src_cfun)->frequency *
  	 frequency_scale / REG_BR_PROB_BASE);
!       EXIT_BLOCK_PTR->count =
! 	(EXIT_BLOCK_PTR_FOR_FUNCTION (src_cfun)->count * count_scale /
  	 REG_BR_PROB_BASE);
!       EXIT_BLOCK_PTR->frequency =
! 	(EXIT_BLOCK_PTR_FOR_FUNCTION (src_cfun)->frequency *
  	 frequency_scale / REG_BR_PROB_BASE);
  
!       entry_block_map = ENTRY_BLOCK_PTR;
!       exit_block_map = EXIT_BLOCK_PTR;
      }
  
!   ENTRY_BLOCK_PTR_FOR_FUNCTION (cfun_to_copy)->aux = entry_block_map;
!   EXIT_BLOCK_PTR_FOR_FUNCTION (cfun_to_copy)->aux = exit_block_map;
  
    /* Duplicate any exception-handling regions.  */
    if (cfun->eh)
--- 897,921 ----
        push_cfun (new_cfun);
        init_empty_tree_cfg ();
  
!       cfun->cfg->entry_block_ptr->count =
! 	(src_cfun->cfg->entry_block_ptr->count * count_scale /
  	 REG_BR_PROB_BASE);
!       cfun->cfg->entry_block_ptr->frequency =
! 	(src_cfun->cfg->entry_block_ptr->frequency *
  	 frequency_scale / REG_BR_PROB_BASE);
!       cfun->cfg->exit_block_ptr->count =
! 	(src_cfun->cfg->exit_block_ptr->count * count_scale /
  	 REG_BR_PROB_BASE);
!       cfun->cfg->exit_block_ptr->frequency =
! 	(src_cfun->cfg->exit_block_ptr->frequency *
  	 frequency_scale / REG_BR_PROB_BASE);
  
!       entry_block_map = cfun->cfg->entry_block_ptr;
!       exit_block_map = cfun->cfg->exit_block_ptr;
      }
  
!   cfun_to_copy->cfg->entry_block_ptr->aux = entry_block_map;
!   cfun_to_copy->cfg->exit_block_ptr->aux = exit_block_map;
  
    /* Duplicate any exception-handling regions.  */
    if (cfun->eh)
*************** copy_body (copy_body_data *id, gcov_type
*** 964,970 ****
    tree body;
  
    /* If this body has a CFG, walk CFG and copy.  */
!   gcc_assert (ENTRY_BLOCK_PTR_FOR_FUNCTION (DECL_STRUCT_FUNCTION (fndecl)));
    body = copy_cfg_body (id, count, frequency, entry_block_map, exit_block_map);
  
    return body;
--- 963,969 ----
    tree body;
  
    /* If this body has a CFG, walk CFG and copy.  */
!   gcc_assert (DECL_STRUCT_FUNCTION (fndecl)->cfg->entry_block_ptr);
    body = copy_cfg_body (id, count, frequency, entry_block_map, exit_block_map);
  
    return body;
*************** optimize_inline_calls (tree fn)
*** 2240,2246 ****
  #endif
    /* We need to rescale frequencies again to peak at REG_BR_PROB_BASE
       as inlining loops might increase the maximum.  */
!   if (ENTRY_BLOCK_PTR->count)
      counts_to_freqs ();
    fold_cond_expr_cond ();
  }
--- 2239,2245 ----
  #endif
    /* We need to rescale frequencies again to peak at REG_BR_PROB_BASE
       as inlining loops might increase the maximum.  */
!   if (cfun->cfg->entry_block_ptr->count)
      counts_to_freqs ();
    fold_cond_expr_cond ();
  }
*************** tree_function_versioning (tree old_decl,
*** 2789,2796 ****
        }
    
    /* Copy the Function's body.  */
!   old_entry_block = ENTRY_BLOCK_PTR_FOR_FUNCTION
!     (DECL_STRUCT_FUNCTION (old_decl));
    new_fndecl = copy_body (&id,
  			  old_entry_block->count,
  			  old_entry_block->frequency, NULL, NULL);
--- 2788,2794 ----
        }
    
    /* Copy the Function's body.  */
!   old_entry_block = DECL_STRUCT_FUNCTION (old_decl)->cfg->entry_block_ptr;
    new_fndecl = copy_body (&id,
  			  old_entry_block->count,
  			  old_entry_block->frequency, NULL, NULL);
Index: sched-int.h
===================================================================
-c -L sched-int.h	(revision 112224) -L sched-int.h	(working copy) .svn/text-base/sched-int.h.svn-base sched-int.h
*** sched-int.h	(revision 112224)
--- sched-int.h	(working copy)
*************** struct sched_info
*** 203,209 ****
    /* Called to notify frontend, that new basic block is being added.
       The first parameter - new basic block.
       The second parameter - block, after which new basic block is being added,
!      or EXIT_BLOCK_PTR, if recovery block is being added,
       or NULL, if standalone block is being added.  */
    void (*add_block) (basic_block, basic_block);
  
--- 203,209 ----
    /* Called to notify frontend, that new basic block is being added.
       The first parameter - new basic block.
       The second parameter - block, after which new basic block is being added,
!      or cfun->cfg->exit_block_ptr, if recovery block is being added,
       or NULL, if standalone block is being added.  */
    void (*add_block) (basic_block, basic_block);
  
Index: combine.c
===================================================================
-c -L combine.c	(revision 112224) -L combine.c	(working copy) .svn/text-base/combine.c.svn-base combine.c
*** combine.c	(revision 112224)
--- combine.c	(working copy)
*************** set_nonzero_bits_and_sign_copies (rtx x,
*** 1040,1046 ****
        /* If this register is undefined at the start of the file, we can't
  	 say what its contents were.  */
        && ! REGNO_REG_SET_P
!          (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start, REGNO (x))
        && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
      {
        if (set == 0 || GET_CODE (set) == CLOBBER)
--- 1040,1046 ----
        /* If this register is undefined at the start of the file, we can't
  	 say what its contents were.  */
        && ! REGNO_REG_SET_P
!          (cfun->cfg->entry_block_ptr->next_bb->il.rtl->global_live_at_start, REGNO (x))
        && GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
      {
        if (set == 0 || GET_CODE (set) == CLOBBER)
*************** try_combine (rtx i3, rtx i2, rtx i1, int
*** 3026,3032 ****
  	ni2dest = SET_DEST (newi2pat);
  
        for (insn = NEXT_INSN (i3);
! 	   insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR
  		    || insn != BB_HEAD (this_basic_block->next_bb));
  	   insn = NEXT_INSN (insn))
  	{
--- 3026,3032 ----
  	ni2dest = SET_DEST (newi2pat);
  
        for (insn = NEXT_INSN (i3);
! 	   insn && (this_basic_block->next_bb == cfun->cfg->exit_block_ptr
  		    || insn != BB_HEAD (this_basic_block->next_bb));
  	   insn = NEXT_INSN (insn))
  	{
*************** try_combine (rtx i3, rtx i2, rtx i1, int
*** 3127,3133 ****
  	      && ! find_reg_note (i2, REG_UNUSED,
  				  SET_DEST (XVECEXP (PATTERN (i2), 0, i))))
  	    for (temp = NEXT_INSN (i2);
! 		 temp && (this_basic_block->next_bb == EXIT_BLOCK_PTR
  			  || BB_HEAD (this_basic_block) != temp);
  		 temp = NEXT_INSN (temp))
  	      if (temp != i3 && INSN_P (temp))
--- 3127,3133 ----
  	      && ! find_reg_note (i2, REG_UNUSED,
  				  SET_DEST (XVECEXP (PATTERN (i2), 0, i))))
  	    for (temp = NEXT_INSN (i2);
! 		 temp && (this_basic_block->next_bb == cfun->cfg->exit_block_ptr
  			  || BB_HEAD (this_basic_block) != temp);
  		 temp = NEXT_INSN (temp))
  	      if (temp != i3 && INSN_P (temp))
*************** reg_nonzero_bits_for_combine (rtx x, enu
*** 8244,8250 ****
  	  || (REGNO (x) >= FIRST_PSEUDO_REGISTER
  	      && REG_N_SETS (REGNO (x)) == 1
  	      && ! REGNO_REG_SET_P
! 	         (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
  		  REGNO (x))))
        && INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
      {
--- 8244,8250 ----
  	  || (REGNO (x) >= FIRST_PSEUDO_REGISTER
  	      && REG_N_SETS (REGNO (x)) == 1
  	      && ! REGNO_REG_SET_P
! 	         (cfun->cfg->entry_block_ptr->next_bb->il.rtl->global_live_at_start,
  		  REGNO (x))))
        && INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
      {
*************** reg_num_sign_bit_copies_for_combine (rtx
*** 8312,8318 ****
            || (REGNO (x) >= FIRST_PSEUDO_REGISTER
  	      && REG_N_SETS (REGNO (x)) == 1
  	      && ! REGNO_REG_SET_P
! 	         (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
  		  REGNO (x))))
        && INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
      {
--- 8312,8318 ----
            || (REGNO (x) >= FIRST_PSEUDO_REGISTER
  	      && REG_N_SETS (REGNO (x)) == 1
  	      && ! REGNO_REG_SET_P
! 	         (cfun->cfg->entry_block_ptr->next_bb->il.rtl->global_live_at_start,
  		  REGNO (x))))
        && INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
      {
*************** get_last_value_validate (rtx *loc, rtx i
*** 11203,11209 ****
  	    || (! (regno >= FIRST_PSEUDO_REGISTER
  		   && REG_N_SETS (regno) == 1
  		   && (! REGNO_REG_SET_P
! 		       (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
  			regno)))
  		&& reg_stat[j].last_set_label > tick))
  	  {
--- 11203,11209 ----
  	    || (! (regno >= FIRST_PSEUDO_REGISTER
  		   && REG_N_SETS (regno) == 1
  		   && (! REGNO_REG_SET_P
! 		       (cfun->cfg->entry_block_ptr->next_bb->il.rtl->global_live_at_start,
  			regno)))
  		&& reg_stat[j].last_set_label > tick))
  	  {
*************** get_last_value (rtx x)
*** 11314,11320 ****
  	  && (regno < FIRST_PSEUDO_REGISTER
  	      || REG_N_SETS (regno) != 1
  	      || (REGNO_REG_SET_P
! 		  (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
  		   regno)))))
      return 0;
  
--- 11314,11320 ----
  	  && (regno < FIRST_PSEUDO_REGISTER
  	      || REG_N_SETS (regno) != 1
  	      || (REGNO_REG_SET_P
! 		  (cfun->cfg->entry_block_ptr->next_bb->il.rtl->global_live_at_start,
  		   regno)))))
      return 0;
  
*************** reg_dead_at_p (rtx reg, rtx insn)
*** 11464,11477 ****
  
    /* Get the basic block that we were in.  */
    if (insn == 0)
!     block = ENTRY_BLOCK_PTR->next_bb;
    else
      {
        FOR_EACH_BB (block)
  	if (insn == BB_HEAD (block))
  	  break;
  
!       if (block == EXIT_BLOCK_PTR)
  	return 0;
      }
  
--- 11464,11477 ----
  
    /* Get the basic block that we were in.  */
    if (insn == 0)
!     block = cfun->cfg->entry_block_ptr->next_bb;
    else
      {
        FOR_EACH_BB (block)
  	if (insn == BB_HEAD (block))
  	  break;
  
!       if (block == cfun->cfg->exit_block_ptr)
  	return 0;
      }
  
*************** distribute_links (rtx links)
*** 12461,12467 ****
  	 since most links don't point very far away.  */
  
        for (insn = NEXT_INSN (XEXP (link, 0));
! 	   (insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR
  		     || BB_HEAD (this_basic_block->next_bb) != insn));
  	   insn = NEXT_INSN (insn))
  	if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn)))
--- 12461,12467 ----
  	 since most links don't point very far away.  */
  
        for (insn = NEXT_INSN (XEXP (link, 0));
! 	   (insn && (this_basic_block->next_bb == cfun->cfg->exit_block_ptr
  		     || BB_HEAD (this_basic_block->next_bb) != insn));
  	   insn = NEXT_INSN (insn))
  	if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn)))
Index: tree-outof-ssa.c
===================================================================
-c -L tree-outof-ssa.c	(revision 112224) -L tree-outof-ssa.c	(working copy) .svn/text-base/tree-outof-ssa.c.svn-base tree-outof-ssa.c
*** tree-outof-ssa.c	(revision 112224)
--- tree-outof-ssa.c	(working copy)
*************** coalesce_abnormal_edges (var_map map, co
*** 592,598 ****
  
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
!       if (e->dest != EXIT_BLOCK_PTR && e->flags & EDGE_ABNORMAL)
  	for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
  	  {
  	    /* Visit each PHI on the destination side of this abnormal
--- 592,598 ----
  
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
!       if (e->dest != cfun->cfg->exit_block_ptr && e->flags & EDGE_ABNORMAL)
  	for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
  	  {
  	    /* Visit each PHI on the destination side of this abnormal
*************** coalesce_result_decls (var_map map, coal
*** 738,745 ****
  	    }
  	  else
  	    add_coalesce (cl, i, x,
! 			  coalesce_cost (EXIT_BLOCK_PTR->frequency,
! 					 maybe_hot_bb_p (EXIT_BLOCK_PTR),
  					 false));
  	}
      }
--- 738,745 ----
  	    }
  	  else
  	    add_coalesce (cl, i, x,
! 			  coalesce_cost (cfun->cfg->exit_block_ptr->frequency,
! 					 maybe_hot_bb_p (cfun->cfg->exit_block_ptr),
  					 false));
  	}
      }
*************** perform_edge_inserts (void)
*** 2288,2294 ****
    FOR_EACH_BB (bb)
      analyze_edges_for_bb (bb);
  
!   analyze_edges_for_bb (EXIT_BLOCK_PTR);
  
    /* Free data structures used in analyze_edges_for_bb.   */
    fini_analyze_edges_for_bb ();
--- 2288,2294 ----
    FOR_EACH_BB (bb)
      analyze_edges_for_bb (bb);
  
!   analyze_edges_for_bb (cfun->cfg->exit_block_ptr);
  
    /* Free data structures used in analyze_edges_for_bb.   */
    fini_analyze_edges_for_bb ();
*************** perform_edge_inserts (void)
*** 2312,2324 ****
  		     e->src->index, e->dest->index);
  	  }
        }
!     FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
        {
  	if (PENDING_STMT (e))
  	  error (" Pending stmts not issued on ENTRY edge (%d, %d)\n", 
  		 e->src->index, e->dest->index);
        }
!     FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
        {
  	if (PENDING_STMT (e))
  	  error (" Pending stmts not issued on EXIT edge (%d, %d)\n", 
--- 2312,2324 ----
  		     e->src->index, e->dest->index);
  	  }
        }
!     FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
        {
  	if (PENDING_STMT (e))
  	  error (" Pending stmts not issued on ENTRY edge (%d, %d)\n", 
  		 e->src->index, e->dest->index);
        }
!     FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
        {
  	if (PENDING_STMT (e))
  	  error (" Pending stmts not issued on EXIT edge (%d, %d)\n", 
Index: bb-reorder.c
===================================================================
-c -L bb-reorder.c	(revision 112224) -L bb-reorder.c	(working copy) .svn/text-base/bb-reorder.c.svn-base bb-reorder.c
*** bb-reorder.c	(revision 112224)
--- bb-reorder.c	(working copy)
*************** find_traces (int *n_traces, struct trace
*** 239,245 ****
    heap = fibheap_new ();
    max_entry_frequency = 0;
    max_entry_count = 0;
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      {
        bbd[e->dest->index].heap = heap;
        bbd[e->dest->index].node = fibheap_insert (heap, bb_to_key (e->dest),
--- 239,245 ----
    heap = fibheap_new ();
    max_entry_frequency = 0;
    max_entry_count = 0;
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      {
        bbd[e->dest->index].heap = heap;
        bbd[e->dest->index].node = fibheap_insert (heap, bb_to_key (e->dest),
*************** rotate_loop (edge back_edge, struct trac
*** 310,316 ****
        edge_iterator ei;
  
        FOR_EACH_EDGE (e, ei, bb->succs)
! 	if (e->dest != EXIT_BLOCK_PTR
  	    && e->dest->il.rtl->visited != trace_n
  	    && (e->flags & EDGE_CAN_FALLTHRU)
  	    && !(e->flags & EDGE_COMPLEX))
--- 310,316 ----
        edge_iterator ei;
  
        FOR_EACH_EDGE (e, ei, bb->succs)
! 	if (e->dest != cfun->cfg->exit_block_ptr
  	    && e->dest->il.rtl->visited != trace_n
  	    && (e->flags & EDGE_CAN_FALLTHRU)
  	    && !(e->flags & EDGE_COMPLEX))
*************** find_traces_1_round (int branch_th, int 
*** 498,504 ****
  	    {
  	      gcc_assert (!(e->flags & EDGE_FAKE));
  
! 	      if (e->dest == EXIT_BLOCK_PTR)
  		continue;
  
  	      if (e->dest->il.rtl->visited
--- 498,504 ----
  	    {
  	      gcc_assert (!(e->flags & EDGE_FAKE));
  
! 	      if (e->dest == cfun->cfg->exit_block_ptr)
  		continue;
  
  	      if (e->dest->il.rtl->visited
*************** find_traces_1_round (int branch_th, int 
*** 554,560 ****
  	  FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e == best_edge
! 		  || e->dest == EXIT_BLOCK_PTR
  		  || e->dest->il.rtl->visited)
  		continue;
  
--- 554,560 ----
  	  FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
  	      if (e == best_edge
! 		  || e->dest == cfun->cfg->exit_block_ptr
  		  || e->dest->il.rtl->visited)
  		continue;
  
*************** find_traces_1_round (int branch_th, int 
*** 628,634 ****
  			     header is not the first block of the function
  			     we can rotate the loop.  */
  
! 			  if (best_edge->dest != ENTRY_BLOCK_PTR->next_bb)
  			    {
  			      if (dump_file)
  				{
--- 628,634 ----
  			     header is not the first block of the function
  			     we can rotate the loop.  */
  
! 			  if (best_edge->dest != cfun->cfg->entry_block_ptr->next_bb)
  			    {
  			      if (dump_file)
  				{
*************** find_traces_1_round (int branch_th, int 
*** 719,725 ****
  	 is an end of the trace).  */
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == EXIT_BLOCK_PTR
  	      || e->dest->il.rtl->visited)
  	    continue;
  
--- 719,725 ----
  	 is an end of the trace).  */
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == cfun->cfg->exit_block_ptr
  	      || e->dest->il.rtl->visited)
  	    continue;
  
*************** bb_to_key (basic_block bb)
*** 822,828 ****
       or whose predecessor edge is EDGE_DFS_BACK.  */
    FOR_EACH_EDGE (e, ei, bb->preds)
      {
!       if ((e->src != ENTRY_BLOCK_PTR && bbd[e->src->index].end_of_trace >= 0)
  	  || (e->flags & EDGE_DFS_BACK))
  	{
  	  int edge_freq = EDGE_FREQUENCY (e);
--- 822,828 ----
       or whose predecessor edge is EDGE_DFS_BACK.  */
    FOR_EACH_EDGE (e, ei, bb->preds)
      {
!       if ((e->src != cfun->cfg->entry_block_ptr && bbd[e->src->index].end_of_trace >= 0)
  	  || (e->flags & EDGE_DFS_BACK))
  	{
  	  int edge_freq = EDGE_FREQUENCY (e);
*************** connect_traces (int n_traces, struct tra
*** 961,967 ****
  	    {
  	      int si = e->src->index;
  
! 	      if (e->src != ENTRY_BLOCK_PTR
  		  && (e->flags & EDGE_CAN_FALLTHRU)
  		  && !(e->flags & EDGE_COMPLEX)
  		  && bbd[si].end_of_trace >= 0
--- 961,967 ----
  	    {
  	      int si = e->src->index;
  
! 	      if (e->src != cfun->cfg->entry_block_ptr
  		  && (e->flags & EDGE_CAN_FALLTHRU)
  		  && !(e->flags & EDGE_COMPLEX)
  		  && bbd[si].end_of_trace >= 0
*************** connect_traces (int n_traces, struct tra
*** 1007,1013 ****
  	    {
  	      int di = e->dest->index;
  
! 	      if (e->dest != EXIT_BLOCK_PTR
  		  && (e->flags & EDGE_CAN_FALLTHRU)
  		  && !(e->flags & EDGE_COMPLEX)
  		  && bbd[di].start_of_trace >= 0
--- 1007,1013 ----
  	    {
  	      int di = e->dest->index;
  
! 	      if (e->dest != cfun->cfg->exit_block_ptr
  		  && (e->flags & EDGE_CAN_FALLTHRU)
  		  && !(e->flags & EDGE_COMPLEX)
  		  && bbd[di].start_of_trace >= 0
*************** connect_traces (int n_traces, struct tra
*** 1043,1049 ****
  	      bool try_copy = false;
  
  	      FOR_EACH_EDGE (e, ei, traces[t].last->succs)
! 		if (e->dest != EXIT_BLOCK_PTR
  		    && (e->flags & EDGE_CAN_FALLTHRU)
  		    && !(e->flags & EDGE_COMPLEX)
  		    && (!best || e->probability > best->probability))
--- 1043,1049 ----
  	      bool try_copy = false;
  
  	      FOR_EACH_EDGE (e, ei, traces[t].last->succs)
! 		if (e->dest != cfun->cfg->exit_block_ptr
  		    && (e->flags & EDGE_CAN_FALLTHRU)
  		    && !(e->flags & EDGE_COMPLEX)
  		    && (!best || e->probability > best->probability))
*************** connect_traces (int n_traces, struct tra
*** 1068,1074 ****
  		      {
  			int di = e2->dest->index;
  
! 			if (e2->dest == EXIT_BLOCK_PTR
  			    || ((e2->flags & EDGE_CAN_FALLTHRU)
  				&& !(e2->flags & EDGE_COMPLEX)
  				&& bbd[di].start_of_trace >= 0
--- 1068,1074 ----
  		      {
  			int di = e2->dest->index;
  
! 			if (e2->dest == cfun->cfg->exit_block_ptr
  			    || ((e2->flags & EDGE_CAN_FALLTHRU)
  				&& !(e2->flags & EDGE_COMPLEX)
  				&& bbd[di].start_of_trace >= 0
*************** connect_traces (int n_traces, struct tra
*** 1084,1090 ****
  			  {
  			    best = e;
  			    best2 = e2;
! 			    if (e2->dest != EXIT_BLOCK_PTR)
  			      best2_len = traces[bbd[di].start_of_trace].length;
  			    else
  			      best2_len = INT_MAX;
--- 1084,1090 ----
  			  {
  			    best = e;
  			    best2 = e2;
! 			    if (e2->dest != cfun->cfg->exit_block_ptr)
  			      best2_len = traces[bbd[di].start_of_trace].length;
  			    else
  			      best2_len = INT_MAX;
*************** connect_traces (int n_traces, struct tra
*** 1113,1119 ****
  			       traces[t].last->index, best->dest->index);
  		      if (!next_bb)
  			fputc ('\n', dump_file);
! 		      else if (next_bb == EXIT_BLOCK_PTR)
  			fprintf (dump_file, "exit\n");
  		      else
  			fprintf (dump_file, "%d\n", next_bb->index);
--- 1113,1119 ----
  			       traces[t].last->index, best->dest->index);
  		      if (!next_bb)
  			fputc ('\n', dump_file);
! 		      else if (next_bb == cfun->cfg->exit_block_ptr)
  			fprintf (dump_file, "exit\n");
  		      else
  			fprintf (dump_file, "%d\n", next_bb->index);
*************** connect_traces (int n_traces, struct tra
*** 1121,1127 ****
  
  		  new_bb = copy_bb (best->dest, best, traces[t].last, t);
  		  traces[t].last = new_bb;
! 		  if (next_bb && next_bb != EXIT_BLOCK_PTR)
  		    {
  		      t = bbd[next_bb->index].start_of_trace;
  		      traces[last_trace].last->aux = traces[t].first;
--- 1121,1127 ----
  
  		  new_bb = copy_bb (best->dest, best, traces[t].last, t);
  		  traces[t].last = new_bb;
! 		  if (next_bb && next_bb != cfun->cfg->exit_block_ptr)
  		    {
  		      t = bbd[next_bb->index].start_of_trace;
  		      traces[last_trace].last->aux = traces[t].first;
*************** find_rarely_executed_basic_blocks_and_cr
*** 1246,1253 ****
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
      {
!       if (e->src != ENTRY_BLOCK_PTR
! 	  && e->dest != EXIT_BLOCK_PTR
  	  && BB_PARTITION (e->src) != BB_PARTITION (e->dest))
  	{
  	  e->flags |= EDGE_CROSSING;
--- 1246,1253 ----
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
      {
!       if (e->src != cfun->cfg->entry_block_ptr
! 	  && e->dest != cfun->cfg->exit_block_ptr
  	  && BB_PARTITION (e->src) != BB_PARTITION (e->dest))
  	{
  	  e->flags |= EDGE_CROSSING;
*************** add_labels_and_missing_jumps (edge *cros
*** 1288,1300 ****
   	  
    	  /* Make sure dest has a label.  */
    	  
!   	  if (dest && (dest != EXIT_BLOCK_PTR))
    	    {
  	      label = block_label (dest);
  	      
   	      /* Make sure source block ends with a jump.  */
  	      
!  	      if (src && (src != ENTRY_BLOCK_PTR)) 
   		{
  		  if (!JUMP_P (BB_END (src)))
   		    /* bb just falls through.  */
--- 1288,1300 ----
   	  
    	  /* Make sure dest has a label.  */
    	  
!   	  if (dest && (dest != cfun->cfg->exit_block_ptr))
    	    {
  	      label = block_label (dest);
  	      
   	      /* Make sure source block ends with a jump.  */
  	      
!  	      if (src && (src != cfun->cfg->entry_block_ptr)) 
   		{
  		  if (!JUMP_P (BB_END (src)))
   		    /* bb just falls through.  */
*************** fix_up_fall_thru_edges (void)
*** 1373,1379 ****
   	  cond_jump = succ1;
   	}
        
!       if (fall_thru && (fall_thru->dest != EXIT_BLOCK_PTR))
    	{
    	  /* Check to see if the fall-thru edge is a crossing edge.  */
  	
--- 1373,1379 ----
   	  cond_jump = succ1;
   	}
        
!       if (fall_thru && (fall_thru->dest != cfun->cfg->exit_block_ptr))
    	{
    	  /* Check to see if the fall-thru edge is a crossing edge.  */
  	
*************** fix_crossing_conditional_branches (void)
*** 1535,1541 ****
    rtx new_jump;
    rtx barrier;
  
!  last_bb = EXIT_BLOCK_PTR->prev_bb;
    
    FOR_EACH_BB (cur_bb)
      {
--- 1535,1541 ----
    rtx new_jump;
    rtx barrier;
  
!  last_bb = cfun->cfg->exit_block_ptr->prev_bb;
    
    FOR_EACH_BB (cur_bb)
      {
*************** duplicate_computed_gotos (void)
*** 2014,2020 ****
        int size, all_flags;
  
        /* Build the reorder chain for the original order of blocks.  */
!       if (bb->next_bb != EXIT_BLOCK_PTR)
  	bb->aux = bb->next_bb;
  
        /* Obviously the block has to end in a computed jump.  */
--- 2014,2020 ----
        int size, all_flags;
  
        /* Build the reorder chain for the original order of blocks.  */
!       if (bb->next_bb != cfun->cfg->exit_block_ptr)
  	bb->aux = bb->next_bb;
  
        /* Obviously the block has to end in a computed jump.  */
*************** duplicate_computed_gotos (void)
*** 2064,2070 ****
           the exit block or the next block.
  	 The destination must have more than one predecessor.  */
        if (!single_succ_p (bb)
! 	  || single_succ (bb) == EXIT_BLOCK_PTR
  	  || single_succ (bb) == bb->next_bb
  	  || single_pred_p (single_succ (bb)))
  	continue;
--- 2064,2070 ----
           the exit block or the next block.
  	 The destination must have more than one predecessor.  */
        if (!single_succ_p (bb)
! 	  || single_succ (bb) == cfun->cfg->exit_block_ptr
  	  || single_succ (bb) == bb->next_bb
  	  || single_pred_p (single_succ (bb)))
  	continue;
Index: resource.c
===================================================================
-c -L resource.c	(revision 112224) -L resource.c	(working copy) .svn/text-base/resource.c.svn-base resource.c
*** resource.c	(revision 112224)
--- resource.c	(working copy)
*************** find_basic_block (rtx insn, int search_l
*** 145,151 ****
  
    /* The start of the function.  */
    else if (insn == 0)
!     return ENTRY_BLOCK_PTR->next_bb->index;
  
    /* See if any of the upcoming CODE_LABELs start a basic block.  If we reach
       anything other than a CODE_LABEL or note, we can't find this code.  */
--- 145,151 ----
  
    /* The start of the function.  */
    else if (insn == 0)
!     return cfun->cfg->entry_block_ptr->next_bb->index;
  
    /* See if any of the upcoming CODE_LABELs start a basic block.  If we reach
       anything other than a CODE_LABEL or note, we can't find this code.  */
Index: var-tracking.c
===================================================================
-c -L var-tracking.c	(revision 112224) -L var-tracking.c	(working copy) .svn/text-base/var-tracking.c.svn-base var-tracking.c
*** var-tracking.c	(revision 112224)
--- var-tracking.c	(working copy)
*************** vt_stack_adjustments (void)
*** 494,508 ****
    int sp;
  
    /* Initialize entry block.  */
!   VTI (ENTRY_BLOCK_PTR)->visited = true;
!   VTI (ENTRY_BLOCK_PTR)->out.stack_adjust = INCOMING_FRAME_SP_OFFSET;
  
    /* Allocate stack for back-tracking up CFG.  */
    stack = XNEWVEC (edge_iterator, n_basic_blocks + 1);
    sp = 0;
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (ENTRY_BLOCK_PTR->succs);
  
    while (sp)
      {
--- 494,508 ----
    int sp;
  
    /* Initialize entry block.  */
!   VTI (cfun->cfg->entry_block_ptr)->visited = true;
!   VTI (cfun->cfg->entry_block_ptr)->out.stack_adjust = INCOMING_FRAME_SP_OFFSET;
  
    /* Allocate stack for back-tracking up CFG.  */
    stack = XNEWVEC (edge_iterator, n_basic_blocks + 1);
    sp = 0;
  
    /* Push the first edge on to the stack.  */
!   stack[sp++] = ei_start (cfun->cfg->entry_block_ptr->succs);
  
    while (sp)
      {
*************** vt_find_locations (void)
*** 1690,1696 ****
  		{
  		  FOR_EACH_EDGE (e, ei, bb->succs)
  		    {
! 		      if (e->dest == EXIT_BLOCK_PTR)
  			continue;
  
  		      if (e->dest == bb)
--- 1690,1696 ----
  		{
  		  FOR_EACH_EDGE (e, ei, bb->succs)
  		    {
! 		      if (e->dest == cfun->cfg->exit_block_ptr)
  			continue;
  
  		      if (e->dest == bb)
*************** vt_add_function_parameters (void)
*** 2494,2500 ****
  
        gcc_assert (parm == decl);
  
!       out = &VTI (ENTRY_BLOCK_PTR)->out;
  
        if (REG_P (incoming))
  	{
--- 2494,2500 ----
  
        gcc_assert (parm == decl);
  
!       out = &VTI (cfun->cfg->entry_block_ptr)->out;
  
        if (REG_P (incoming))
  	{
Index: cfgloop.c
===================================================================
-c -L cfgloop.c	(revision 112224) -L cfgloop.c	(working copy) .svn/text-base/cfgloop.c.svn-base cfgloop.c
*** cfgloop.c	(revision 112224)
--- cfgloop.c	(working copy)
*************** flow_loop_nodes_find (basic_block header
*** 251,257 ****
  	    {
  	      basic_block ancestor = e->src;
  
! 	      if (ancestor != ENTRY_BLOCK_PTR
  		  && ancestor->loop_father != loop)
  		{
  		  ancestor->loop_father = loop;
--- 251,257 ----
  	    {
  	      basic_block ancestor = e->src;
  
! 	      if (ancestor != cfun->cfg->entry_block_ptr
  		  && ancestor->loop_father != loop)
  		{
  		  ancestor->loop_father = loop;
*************** mark_single_exit_loops (struct loops *lo
*** 291,297 ****
  	continue;
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == EXIT_BLOCK_PTR)
  	    continue;
  
  	  if (flow_bb_inside_loop_p (bb->loop_father, e->dest))
--- 291,297 ----
  	continue;
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == cfun->cfg->exit_block_ptr)
  	    continue;
  
  	  if (flow_bb_inside_loop_p (bb->loop_father, e->dest))
*************** mark_single_exit_loops (struct loops *lo
*** 304,310 ****
  	      /* If we have already seen an exit, mark this by the edge that
  		 surely does not occur as any exit.  */
  	      if (loop->single_exit)
! 		loop->single_exit = single_succ_edge (ENTRY_BLOCK_PTR);
  	      else
  		loop->single_exit = e;
  	    }
--- 304,310 ----
  	      /* If we have already seen an exit, mark this by the edge that
  		 surely does not occur as any exit.  */
  	      if (loop->single_exit)
! 		loop->single_exit = single_succ_edge (cfun->cfg->entry_block_ptr);
  	      else
  		loop->single_exit = e;
  	    }
*************** mark_single_exit_loops (struct loops *lo
*** 317,323 ****
        if (!loop)
  	continue;
  
!       if (loop->single_exit == single_succ_edge (ENTRY_BLOCK_PTR))
  	loop->single_exit = NULL;
      }
  
--- 317,323 ----
        if (!loop)
  	continue;
  
!       if (loop->single_exit == single_succ_edge (cfun->cfg->entry_block_ptr))
  	loop->single_exit = NULL;
      }
  
*************** canonicalize_loop_headers (void)
*** 480,486 ****
  	  if (e->flags & EDGE_ABNORMAL)
  	    have_abnormal_edge = 1;
  
! 	  if (latch != ENTRY_BLOCK_PTR
  	      && dominated_by_p (CDI_DOMINATORS, latch, header))
  	    {
  	      num_latches++;
--- 480,486 ----
  	  if (e->flags & EDGE_ABNORMAL)
  	    have_abnormal_edge = 1;
  
! 	  if (latch != cfun->cfg->entry_block_ptr
  	      && dominated_by_p (CDI_DOMINATORS, latch, header))
  	    {
  	      num_latches++;
*************** canonicalize_loop_headers (void)
*** 493,505 ****
  	HEADER_BLOCK (header) = num_latches;
      }
  
!   if (HEADER_BLOCK (single_succ (ENTRY_BLOCK_PTR)))
      {
        basic_block bb;
  
        /* We could not redirect edges freely here. On the other hand,
  	 we can simply split the edge from entry block.  */
!       bb = split_edge (single_succ_edge (ENTRY_BLOCK_PTR));
  
        alloc_aux_for_edge (single_succ_edge (bb), sizeof (int));
        LATCH_EDGE (single_succ_edge (bb)) = 0;
--- 493,505 ----
  	HEADER_BLOCK (header) = num_latches;
      }
  
!   if (HEADER_BLOCK (single_succ (cfun->cfg->entry_block_ptr)))
      {
        basic_block bb;
  
        /* We could not redirect edges freely here. On the other hand,
  	 we can simply split the edge from entry block.  */
!       bb = split_edge (single_succ_edge (cfun->cfg->entry_block_ptr));
  
        alloc_aux_for_edge (single_succ_edge (bb), sizeof (int));
        LATCH_EDGE (single_succ_edge (bb)) = 0;
*************** flow_loops_find (struct loops *loops)
*** 653,659 ****
  	     node (header) that dominates all the nodes in the
  	     loop.  It also has single back edge to the header
  	     from a latch node.  */
! 	  if (latch != ENTRY_BLOCK_PTR
  	      && dominated_by_p (CDI_DOMINATORS, latch, header))
  	    {
  	      /* Shared headers should be eliminated by now.  */
--- 653,659 ----
  	     node (header) that dominates all the nodes in the
  	     loop.  It also has single back edge to the header
  	     from a latch node.  */
! 	  if (latch != cfun->cfg->entry_block_ptr
  	      && dominated_by_p (CDI_DOMINATORS, latch, header))
  	    {
  	      /* Shared headers should be eliminated by now.  */
*************** flow_loops_find (struct loops *loops)
*** 676,685 ****
    loops->parray[0]->depth = 0;
    loops->parray[0]->pred = NULL;
    loops->parray[0]->num_nodes = n_basic_blocks;
!   loops->parray[0]->latch = EXIT_BLOCK_PTR;
!   loops->parray[0]->header = ENTRY_BLOCK_PTR;
!   ENTRY_BLOCK_PTR->loop_father = loops->parray[0];
!   EXIT_BLOCK_PTR->loop_father = loops->parray[0];
  
    loops->tree_root = loops->parray[0];
  
--- 676,685 ----
    loops->parray[0]->depth = 0;
    loops->parray[0]->pred = NULL;
    loops->parray[0]->num_nodes = n_basic_blocks;
!   loops->parray[0]->latch = cfun->cfg->exit_block_ptr;
!   loops->parray[0]->header = cfun->cfg->entry_block_ptr;
!   cfun->cfg->entry_block_ptr->loop_father = loops->parray[0];
!   cfun->cfg->exit_block_ptr->loop_father = loops->parray[0];
  
    loops->tree_root = loops->parray[0];
  
*************** flow_loops_find (struct loops *loops)
*** 726,732 ****
  	    {
  	      basic_block latch = e->src;
  
! 	      if (latch != ENTRY_BLOCK_PTR
  		  && dominated_by_p (CDI_DOMINATORS, latch, header))
  		{
  		  loop->latch = latch;
--- 726,732 ----
  	    {
  	      basic_block latch = e->src;
  
! 	      if (latch != cfun->cfg->entry_block_ptr
  		  && dominated_by_p (CDI_DOMINATORS, latch, header))
  		{
  		  loop->latch = latch;
*************** flow_bb_inside_loop_p (const struct loop
*** 763,769 ****
  {
    struct loop *source_loop;
  
!   if (bb == ENTRY_BLOCK_PTR || bb == EXIT_BLOCK_PTR)
      return 0;
  
    source_loop = bb->loop_father;
--- 763,769 ----
  {
    struct loop *source_loop;
  
!   if (bb == cfun->cfg->entry_block_ptr || bb == cfun->cfg->exit_block_ptr)
      return 0;
  
    source_loop = bb->loop_father;
*************** get_loop_body (const struct loop *loop)
*** 791,803 ****
    tovisit = XCNEWVEC (basic_block, loop->num_nodes);
    tovisit[tv++] = loop->header;
  
!   if (loop->latch == EXIT_BLOCK_PTR)
      {
        /* There may be blocks unreachable from EXIT_BLOCK.  */
        gcc_assert (loop->num_nodes == (unsigned) n_basic_blocks);
        FOR_EACH_BB (bb)
  	tovisit[tv++] = bb;
!       tovisit[tv++] = EXIT_BLOCK_PTR;
      }
    else if (loop->latch != loop->header)
      {
--- 791,803 ----
    tovisit = XCNEWVEC (basic_block, loop->num_nodes);
    tovisit[tv++] = loop->header;
  
!   if (loop->latch == cfun->cfg->exit_block_ptr)
      {
        /* There may be blocks unreachable from EXIT_BLOCK.  */
        gcc_assert (loop->num_nodes == (unsigned) n_basic_blocks);
        FOR_EACH_BB (bb)
  	tovisit[tv++] = bb;
!       tovisit[tv++] = cfun->cfg->exit_block_ptr;
      }
    else if (loop->latch != loop->header)
      {
*************** get_loop_body_in_dom_order (const struct
*** 853,859 ****
  
    tovisit = XCNEWVEC (basic_block, loop->num_nodes);
  
!   gcc_assert (loop->latch != EXIT_BLOCK_PTR);
  
    tv = 0;
    fill_sons_in_loop (loop, loop->header, tovisit, &tv);
--- 853,859 ----
  
    tovisit = XCNEWVEC (basic_block, loop->num_nodes);
  
!   gcc_assert (loop->latch != cfun->cfg->exit_block_ptr);
  
    tv = 0;
    fill_sons_in_loop (loop, loop->header, tovisit, &tv);
*************** get_loop_body_in_bfs_order (const struct
*** 875,881 ****
    unsigned int vc = 1;
  
    gcc_assert (loop->num_nodes);
!   gcc_assert (loop->latch != EXIT_BLOCK_PTR);
  
    blocks = XCNEWVEC (basic_block, loop->num_nodes);
    visited = BITMAP_ALLOC (NULL);
--- 875,881 ----
    unsigned int vc = 1;
  
    gcc_assert (loop->num_nodes);
!   gcc_assert (loop->latch != cfun->cfg->exit_block_ptr);
  
    blocks = XCNEWVEC (basic_block, loop->num_nodes);
    visited = BITMAP_ALLOC (NULL);
*************** get_loop_exit_edges (const struct loop *
*** 923,929 ****
    basic_block * body;
    edge_iterator ei;
  
!   gcc_assert (loop->latch != EXIT_BLOCK_PTR);
  
    body = get_loop_body (loop);
    n = 0;
--- 923,929 ----
    basic_block * body;
    edge_iterator ei;
  
!   gcc_assert (loop->latch != cfun->cfg->exit_block_ptr);
  
    body = get_loop_body (loop);
    n = 0;
*************** num_loop_branches (const struct loop *lo
*** 951,957 ****
    unsigned i, n;
    basic_block * body;
  
!   gcc_assert (loop->latch != EXIT_BLOCK_PTR);
  
    body = get_loop_body (loop);
    n = 0;
--- 951,957 ----
    unsigned i, n;
    basic_block * body;
  
!   gcc_assert (loop->latch != cfun->cfg->exit_block_ptr);
  
    body = get_loop_body (loop);
    n = 0;
*************** verify_loop_structure (struct loops *loo
*** 1214,1220 ****
  	    continue;
  	  FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
! 	      if (e->dest == EXIT_BLOCK_PTR)
  		continue;
  
  	      if (flow_bb_inside_loop_p (bb->loop_father, e->dest))
--- 1214,1220 ----
  	    continue;
  	  FOR_EACH_EDGE (e, ei, bb->succs)
  	    {
! 	      if (e->dest == cfun->cfg->exit_block_ptr)
  		continue;
  
  	      if (flow_bb_inside_loop_p (bb->loop_father, e->dest))
Index: cfgloop.h
===================================================================
-c -L cfgloop.h	(revision 112224) -L cfgloop.h	(working copy) .svn/text-base/cfgloop.h.svn-base cfgloop.h
*** cfgloop.h	(revision 112224)
--- cfgloop.h	(working copy)
*************** struct loop
*** 121,127 ****
    struct nb_iter_bound *bounds;
  
    /* If not NULL, loop has just single exit edge stored here (edges to the
!      EXIT_BLOCK_PTR do not count.  */
    edge single_exit;
  
    /* True when the loop does not carry data dependences, and
--- 121,127 ----
    struct nb_iter_bound *bounds;
  
    /* If not NULL, loop has just single exit edge stored here (edges to the
!      cfun->cfg->exit_block_ptr do not count.  */
    edge single_exit;
  
    /* True when the loop does not carry data dependences, and
Index: df-problems.c
===================================================================
-c -L df-problems.c	(revision 112224) -L df-problems.c	(working copy) .svn/text-base/df-problems.c.svn-base df-problems.c
*** df-problems.c	(revision 112224)
--- df-problems.c	(working copy)
*************** df_lr_confluence_0 (struct dataflow *dfl
*** 1579,1585 ****
    struct df *df = dflow->df;
  
    bitmap op1 = df_lr_get_bb_info (dflow, bb->index)->out;
!   if (bb != EXIT_BLOCK_PTR)
      bitmap_copy (op1, df->hardware_regs_used);
  } 
  
--- 1579,1585 ----
    struct df *df = dflow->df;
  
    bitmap op1 = df_lr_get_bb_info (dflow, bb->index)->out;
!   if (bb != cfun->cfg->exit_block_ptr)
      bitmap_copy (op1, df->hardware_regs_used);
  } 
  
Index: reg-stack.c
===================================================================
-c -L reg-stack.c	(revision 112224) -L reg-stack.c	(working copy) .svn/text-base/reg-stack.c.svn-base reg-stack.c
*** reg-stack.c	(revision 112224)
--- reg-stack.c	(working copy)
*************** convert_regs_entry (void)
*** 2548,2554 ****
       Note that we are inserting converted code here.  This code is
       never seen by the convert_regs pass.  */
  
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      {
        basic_block block = e->dest;
        block_info bi = BLOCK_INFO (block);
--- 2548,2554 ----
       Note that we are inserting converted code here.  This code is
       never seen by the convert_regs pass.  */
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      {
        basic_block block = e->dest;
        block_info bi = BLOCK_INFO (block);
*************** convert_regs_exit (void)
*** 2593,2599 ****
  	+ hard_regno_nregs[value_reg_low][GET_MODE (retvalue)] - 1;
      }
  
!   output_stack = &BLOCK_INFO (EXIT_BLOCK_PTR)->stack_in;
    if (value_reg_low == -1)
      output_stack->top = -1;
    else
--- 2593,2599 ----
  	+ hard_regno_nregs[value_reg_low][GET_MODE (retvalue)] - 1;
      }
  
!   output_stack = &BLOCK_INFO (cfun->cfg->exit_block_ptr)->stack_in;
    if (value_reg_low == -1)
      output_stack->top = -1;
    else
*************** compensate_edges (void)
*** 2741,2747 ****
    starting_stack_p = false;
  
    FOR_EACH_BB (bb)
!     if (bb != ENTRY_BLOCK_PTR)
        {
          edge e;
          edge_iterator ei;
--- 2741,2747 ----
    starting_stack_p = false;
  
    FOR_EACH_BB (bb)
!     if (bb != cfun->cfg->entry_block_ptr)
        {
          edge e;
          edge_iterator ei;
*************** convert_regs (void)
*** 2992,3005 ****
  
    /* Construct the desired stack for function exit.  */
    convert_regs_exit ();
!   BLOCK_INFO (EXIT_BLOCK_PTR)->done = 1;
  
    /* ??? Future: process inner loops first, and give them arbitrary
       initial stacks which emit_swap_insn can modify.  This ought to
       prevent double fxch that often appears at the head of a loop.  */
  
    /* Process all blocks reachable from all entry points.  */
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      convert_regs_2 (e->dest);
  
    /* ??? Process all unreachable blocks.  Though there's no excuse
--- 2992,3005 ----
  
    /* Construct the desired stack for function exit.  */
    convert_regs_exit ();
!   BLOCK_INFO (cfun->cfg->exit_block_ptr)->done = 1;
  
    /* ??? Future: process inner loops first, and give them arbitrary
       initial stacks which emit_swap_insn can modify.  This ought to
       prevent double fxch that often appears at the head of a loop.  */
  
    /* Process all blocks reachable from all entry points.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      convert_regs_2 (e->dest);
  
    /* ??? Process all unreachable blocks.  Though there's no excuse
*************** reg_to_stack (void)
*** 3075,3081 ****
  
        FOR_EACH_EDGE (e, ei, bb->preds)
  	if (!(e->flags & EDGE_DFS_BACK)
! 	    && e->src != ENTRY_BLOCK_PTR)
  	  bi->predecessors++;
  
        /* Set current register status at last instruction `uninitialized'.  */
--- 3075,3081 ----
  
        FOR_EACH_EDGE (e, ei, bb->preds)
  	if (!(e->flags & EDGE_DFS_BACK)
! 	    && e->src != cfun->cfg->entry_block_ptr)
  	  bi->predecessors++;
  
        /* Set current register status at last instruction `uninitialized'.  */
Index: sched-rgn.c
===================================================================
-c -L sched-rgn.c	(revision 112224) -L sched-rgn.c	(working copy) .svn/text-base/sched-rgn.c.svn-base sched-rgn.c
*** sched-rgn.c	(revision 112224)
--- sched-rgn.c	(working copy)
*************** find_rgns (void)
*** 558,564 ****
  
    /* DFS traversal to find inner loops in the cfg.  */
  
!   current_edge = ei_start (single_succ (ENTRY_BLOCK_PTR)->succs);
    sp = -1;
  
    while (1)
--- 558,564 ----
  
    /* DFS traversal to find inner loops in the cfg.  */
  
!   current_edge = ei_start (single_succ (cfun->cfg->entry_block_ptr)->succs);
    sp = -1;
  
    while (1)
*************** find_rgns (void)
*** 733,739 ****
  	      /* If we exited the loop early, then I is the header of
  		 a non-reducible loop and we should quit processing it
  		 now.  */
! 	      if (jbb != EXIT_BLOCK_PTR)
  		continue;
  
  	      /* I is a header of an inner loop, or block 0 in a subroutine
--- 733,739 ----
  	      /* If we exited the loop early, then I is the header of
  		 a non-reducible loop and we should quit processing it
  		 now.  */
! 	      if (jbb != cfun->cfg->exit_block_ptr)
  		continue;
  
  	      /* I is a header of an inner loop, or block 0 in a subroutine
*************** find_rgns (void)
*** 751,757 ****
  	      /* Decrease degree of all I's successors for topological
  		 ordering.  */
  	      FOR_EACH_EDGE (e, ei, bb->succs)
! 		if (e->dest != EXIT_BLOCK_PTR)
  		  --degree[e->dest->index];
  
  	      /* Estimate # insns, and count # blocks in the region.  */
--- 751,757 ----
  	      /* Decrease degree of all I's successors for topological
  		 ordering.  */
  	      FOR_EACH_EDGE (e, ei, bb->succs)
! 		if (e->dest != cfun->cfg->exit_block_ptr)
  		  --degree[e->dest->index];
  
  	      /* Estimate # insns, and count # blocks in the region.  */
*************** find_rgns (void)
*** 769,775 ****
  		    /* Leaf nodes have only a single successor which must
  		       be EXIT_BLOCK.  */
  		    if (single_succ_p (jbb)
! 			&& single_succ (jbb) == EXIT_BLOCK_PTR)
  		      {
  			queue[++tail] = jbb->index;
  			SET_BIT (in_queue, jbb->index);
--- 769,775 ----
  		    /* Leaf nodes have only a single successor which must
  		       be EXIT_BLOCK.  */
  		    if (single_succ_p (jbb)
! 			&& single_succ (jbb) == cfun->cfg->exit_block_ptr)
  		      {
  			queue[++tail] = jbb->index;
  			SET_BIT (in_queue, jbb->index);
*************** find_rgns (void)
*** 787,793 ****
  
  		  FOR_EACH_EDGE (e, ei, bb->preds)
  		    {
! 		      if (e->src == ENTRY_BLOCK_PTR)
  			continue;
  
  		      node = e->src->index;
--- 787,793 ----
  
  		  FOR_EACH_EDGE (e, ei, bb->preds)
  		    {
! 		      if (e->src == cfun->cfg->entry_block_ptr)
  			continue;
  
  		      node = e->src->index;
*************** find_rgns (void)
*** 848,854 ****
  
  		      /* See discussion above about nodes not marked as in
  			 this loop during the initial DFS traversal.  */
! 		      if (e->src == ENTRY_BLOCK_PTR
  			  || max_hdr[node] != loop_head)
  			{
  			  tail = -1;
--- 848,854 ----
  
  		      /* See discussion above about nodes not marked as in
  			 this loop during the initial DFS traversal.  */
! 		      if (e->src == cfun->cfg->entry_block_ptr
  			  || max_hdr[node] != loop_head)
  			{
  			  tail = -1;
*************** find_rgns (void)
*** 900,906 ****
  			  queue[head] = queue[tail--];
  
  			  FOR_EACH_EDGE (e, ei, BASIC_BLOCK (child)->succs)
! 			    if (e->dest != EXIT_BLOCK_PTR)
  			      --degree[e->dest->index];
  			}
  		      else
--- 900,906 ----
  			  queue[head] = queue[tail--];
  
  			  FOR_EACH_EDGE (e, ei, BASIC_BLOCK (child)->succs)
! 			    if (e->dest != cfun->cfg->exit_block_ptr)
  			      --degree[e->dest->index];
  			}
  		      else
*************** find_rgns (void)
*** 920,926 ****
  		     This may provide several smaller regions instead
  		     of one too_large region.  */
                    FOR_EACH_EDGE (e, ei, bb->succs)
!                     if (e->dest != EXIT_BLOCK_PTR)
                        SET_BIT (extended_rgn_header, e->dest->index);
                  }
  	    }
--- 920,926 ----
  		     This may provide several smaller regions instead
  		     of one too_large region.  */
                    FOR_EACH_EDGE (e, ei, bb->succs)
!                     if (e->dest != cfun->cfg->exit_block_ptr)
                        SET_BIT (extended_rgn_header, e->dest->index);
                  }
  	    }
*************** extend_rgns (int *degree, int *idxp, sbi
*** 1185,1191 ****
  	      BLOCK_TO_BB (bbn) = 0;
  
  	      FOR_EACH_EDGE (e, ei, BASIC_BLOCK (bbn)->succs)
! 		if (e->dest != EXIT_BLOCK_PTR)
  		  degree[e->dest->index]--;
  
  	      if (!large)
--- 1185,1191 ----
  	      BLOCK_TO_BB (bbn) = 0;
  
  	      FOR_EACH_EDGE (e, ei, BASIC_BLOCK (bbn)->succs)
! 		if (e->dest != cfun->cfg->exit_block_ptr)
  		  degree[e->dest->index]--;
  
  	      if (!large)
*************** extend_rgns (int *degree, int *idxp, sbi
*** 1242,1248 ****
  		      idx++;
  				
  		      FOR_EACH_EDGE (e, ei, BASIC_BLOCK (succn)->succs)
! 			if (e->dest != EXIT_BLOCK_PTR)
  			  degree[e->dest->index]--;
  		    }
  		}
--- 1242,1248 ----
  		      idx++;
  				
  		      FOR_EACH_EDGE (e, ei, BASIC_BLOCK (succn)->succs)
! 			if (e->dest != cfun->cfg->exit_block_ptr)
  			  degree[e->dest->index]--;
  		    }
  		}
*************** compute_dom_prob_ps (int bb)
*** 1306,1312 ****
        edge out_edge;
        edge_iterator out_ei;
  
!       if (in_edge->src == ENTRY_BLOCK_PTR)
  	continue;
  
        pred_bb = BLOCK_TO_BB (in_edge->src->index);
--- 1306,1312 ----
        edge out_edge;
        edge_iterator out_ei;
  
!       if (in_edge->src == cfun->cfg->entry_block_ptr)
  	continue;
  
        pred_bb = BLOCK_TO_BB (in_edge->src->index);
*************** propagate_deps (int bb, struct deps *pre
*** 2425,2431 ****
        reg_set_iterator rsi;
  
        /* Only bbs "below" bb, in the same region, are interesting.  */
!       if (e->dest == EXIT_BLOCK_PTR
  	  || CONTAINING_RGN (block->index) != CONTAINING_RGN (e->dest->index)
  	  || BLOCK_TO_BB (e->dest->index) <= bb)
  	continue;
--- 2425,2431 ----
        reg_set_iterator rsi;
  
        /* Only bbs "below" bb, in the same region, are interesting.  */
!       if (e->dest == cfun->cfg->exit_block_ptr
  	  || CONTAINING_RGN (block->index) != CONTAINING_RGN (e->dest->index)
  	  || BLOCK_TO_BB (e->dest->index) <= bb)
  	continue;
*************** add_block1 (basic_block bb, basic_block 
*** 3108,3114 ****
  {
    extend_regions ();
  
!   if (after == 0 || after == EXIT_BLOCK_PTR)
      {
        int i;
        
--- 3108,3114 ----
  {
    extend_regions ();
  
!   if (after == 0 || after == cfun->cfg->exit_block_ptr)
      {
        int i;
        
*************** add_block1 (basic_block bb, basic_block 
*** 3117,3123 ****
  
        rgn_bb_table[i] = bb->index;
        RGN_NR_BLOCKS (nr_regions) = 1;
!       RGN_DONT_CALC_DEPS (nr_regions) = after == EXIT_BLOCK_PTR;
        RGN_HAS_REAL_EBB (nr_regions) = 0;
        CONTAINING_RGN (bb->index) = nr_regions;
        BLOCK_TO_BB (bb->index) = 0;
--- 3117,3123 ----
  
        rgn_bb_table[i] = bb->index;
        RGN_NR_BLOCKS (nr_regions) = 1;
!       RGN_DONT_CALC_DEPS (nr_regions) = after == cfun->cfg->exit_block_ptr;
        RGN_HAS_REAL_EBB (nr_regions) = 0;
        CONTAINING_RGN (bb->index) = nr_regions;
        BLOCK_TO_BB (bb->index) = 0;
Index: basic-block.h
===================================================================
-c -L basic-block.h	(revision 112224) -L basic-block.h	(working copy) .svn/text-base/basic-block.h.svn-base basic-block.h
*** basic-block.h	(revision 112224)
--- basic-block.h	(working copy)
*************** struct control_flow_graph GTY(())
*** 363,370 ****
  {
    /* Block pointers for the exit and entry of a function.
       These are always the head and tail of the basic block list.  */
!   basic_block x_entry_block_ptr;
!   basic_block x_exit_block_ptr;
  
    /* Index by basic block number, get basic block struct info.  */
    VEC(basic_block,gc) *x_basic_block_info;
--- 363,370 ----
  {
    /* Block pointers for the exit and entry of a function.
       These are always the head and tail of the basic block list.  */
!   basic_block entry_block_ptr;
!   basic_block exit_block_ptr;
  
    /* Index by basic block number, get basic block struct info.  */
    VEC(basic_block,gc) *x_basic_block_info;
*************** struct control_flow_graph GTY(())
*** 390,397 ****
  };
  
  /* Defines for accessing the fields of the CFG structure for function FN.  */
- #define ENTRY_BLOCK_PTR_FOR_FUNCTION(FN)     ((FN)->cfg->x_entry_block_ptr)
- #define EXIT_BLOCK_PTR_FOR_FUNCTION(FN)	     ((FN)->cfg->x_exit_block_ptr)
  #define basic_block_info_for_function(FN)    ((FN)->cfg->x_basic_block_info)
  #define n_basic_blocks_for_function(FN)	     ((FN)->cfg->x_n_basic_blocks)
  #define n_edges_for_function(FN)	     ((FN)->cfg->x_n_edges)
--- 390,395 ----
*************** struct control_flow_graph GTY(())
*** 402,409 ****
    (VEC_index (basic_block, basic_block_info_for_function(FN), (N)))
  
  /* Defines for textual backward source compatibility.  */
- #define ENTRY_BLOCK_PTR		(cfun->cfg->x_entry_block_ptr)
- #define EXIT_BLOCK_PTR		(cfun->cfg->x_exit_block_ptr)
  #define basic_block_info	(cfun->cfg->x_basic_block_info)
  #define n_basic_blocks		(cfun->cfg->x_n_basic_blocks)
  #define n_edges			(cfun->cfg->x_n_edges)
--- 400,405 ----
*************** struct control_flow_graph GTY(())
*** 419,430 ****
    for (BB = FROM; BB != TO; BB = BB->DIR)
  
  #define FOR_EACH_BB_FN(BB, FN) \
!   FOR_BB_BETWEEN (BB, (FN)->cfg->x_entry_block_ptr->next_bb, (FN)->cfg->x_exit_block_ptr, next_bb)
  
  #define FOR_EACH_BB(BB) FOR_EACH_BB_FN (BB, cfun)
  
  #define FOR_EACH_BB_REVERSE_FN(BB, FN) \
!   FOR_BB_BETWEEN (BB, (FN)->cfg->x_exit_block_ptr->prev_bb, (FN)->cfg->x_entry_block_ptr, prev_bb)
  
  #define FOR_EACH_BB_REVERSE(BB) FOR_EACH_BB_REVERSE_FN(BB, cfun)
  
--- 415,426 ----
    for (BB = FROM; BB != TO; BB = BB->DIR)
  
  #define FOR_EACH_BB_FN(BB, FN) \
!   FOR_BB_BETWEEN (BB, (FN)->cfg->entry_block_ptr->next_bb, (FN)->cfg->exit_block_ptr, next_bb)
  
  #define FOR_EACH_BB(BB) FOR_EACH_BB_FN (BB, cfun)
  
  #define FOR_EACH_BB_REVERSE_FN(BB, FN) \
!   FOR_BB_BETWEEN (BB, (FN)->cfg->exit_block_ptr->prev_bb, (FN)->cfg->entry_block_ptr, prev_bb)
  
  #define FOR_EACH_BB_REVERSE(BB) FOR_EACH_BB_REVERSE_FN(BB, cfun)
  
*************** struct control_flow_graph GTY(())
*** 443,452 ****
     exit block).  */
  
  #define FOR_ALL_BB(BB) \
!   for (BB = ENTRY_BLOCK_PTR; BB; BB = BB->next_bb)
  
  #define FOR_ALL_BB_FN(BB, FN) \
!   for (BB = ENTRY_BLOCK_PTR_FOR_FUNCTION (FN); BB; BB = BB->next_bb)
  
  extern bitmap_obstack reg_obstack;
  
--- 439,448 ----
     exit block).  */
  
  #define FOR_ALL_BB(BB) \
!   for (BB = cfun->cfg->entry_block_ptr; BB; BB = BB->next_bb)
  
  #define FOR_ALL_BB_FN(BB, FN) \
!   for (BB = (FN)->cfg->entry_block_ptr; BB; BB = BB->next_bb)
  
  extern bitmap_obstack reg_obstack;
  
Index: tree-cfg.c
===================================================================
-c -L tree-cfg.c	(revision 112224) -L tree-cfg.c	(working copy) .svn/text-base/tree-cfg.c.svn-base tree-cfg.c
*** tree-cfg.c	(revision 112224)
--- tree-cfg.c	(working copy)
*************** init_empty_tree_cfg (void)
*** 142,151 ****
    memset (VEC_address (basic_block, label_to_block_map),
  	  0, sizeof (basic_block) * initial_cfg_capacity);
  
!   SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR);
!   SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR);
!   ENTRY_BLOCK_PTR->next_bb = EXIT_BLOCK_PTR;
!   EXIT_BLOCK_PTR->prev_bb = ENTRY_BLOCK_PTR;
  }
  
  /*---------------------------------------------------------------------------
--- 142,151 ----
    memset (VEC_address (basic_block, label_to_block_map),
  	  0, sizeof (basic_block) * initial_cfg_capacity);
  
!   SET_BASIC_BLOCK (ENTRY_BLOCK, cfun->cfg->entry_block_ptr);
!   SET_BASIC_BLOCK (EXIT_BLOCK, cfun->cfg->exit_block_ptr);
!   cfun->cfg->entry_block_ptr->next_bb = cfun->cfg->exit_block_ptr;
!   cfun->cfg->exit_block_ptr->prev_bb = cfun->cfg->entry_block_ptr;
  }
  
  /*---------------------------------------------------------------------------
*************** build_tree_cfg (tree *tp)
*** 178,184 ****
  
    /* Make sure there is always at least one block, even if it's empty.  */
    if (n_basic_blocks == NUM_FIXED_BLOCKS)
!     create_empty_bb (ENTRY_BLOCK_PTR);
  
    /* Adjust the size of the array.  */
    if (VEC_length (basic_block, basic_block_info) < (size_t) n_basic_blocks)
--- 178,184 ----
  
    /* Make sure there is always at least one block, even if it's empty.  */
    if (n_basic_blocks == NUM_FIXED_BLOCKS)
!     create_empty_bb (cfun->cfg->entry_block_ptr);
  
    /* Adjust the size of the array.  */
    if (VEC_length (basic_block, basic_block_info) < (size_t) n_basic_blocks)
*************** make_blocks (tree stmt_list)
*** 334,340 ****
    tree stmt = NULL;
    bool start_new_block = true;
    bool first_stmt_of_list = true;
!   basic_block bb = ENTRY_BLOCK_PTR;
  
    while (!tsi_end_p (i))
      {
--- 334,340 ----
    tree stmt = NULL;
    bool start_new_block = true;
    bool first_stmt_of_list = true;
!   basic_block bb = cfun->cfg->entry_block_ptr;
  
    while (!tsi_end_p (i))
      {
*************** make_edges (void)
*** 450,456 ****
  
    /* Create an edge from entry to the first block with executable
       statements in it.  */
!   make_edge (ENTRY_BLOCK_PTR, BASIC_BLOCK (NUM_FIXED_BLOCKS), EDGE_FALLTHRU);
  
    /* Traverse the basic block array placing edges.  */
    FOR_EACH_BB (bb)
--- 450,456 ----
  
    /* Create an edge from entry to the first block with executable
       statements in it.  */
!   make_edge (cfun->cfg->entry_block_ptr, BASIC_BLOCK (NUM_FIXED_BLOCKS), EDGE_FALLTHRU);
  
    /* Traverse the basic block array placing edges.  */
    FOR_EACH_BB (bb)
*************** make_ctrl_stmt_edges (basic_block bb)
*** 533,539 ****
        break;
  
      case RETURN_EXPR:
!       make_edge (bb, EXIT_BLOCK_PTR, 0);
        break;
  
      case COND_EXPR:
--- 533,539 ----
        break;
  
      case RETURN_EXPR:
!       make_edge (bb, cfun->cfg->exit_block_ptr, 0);
        break;
  
      case COND_EXPR:
*************** make_ctrl_stmt_edges (basic_block bb)
*** 548,554 ****
        make_eh_edges (last);
        /* Yet another NORETURN hack.  */
        if (EDGE_COUNT (bb->succs) == 0)
! 	make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
        break;
  
      default:
--- 548,554 ----
        make_eh_edges (last);
        /* Yet another NORETURN hack.  */
        if (EDGE_COUNT (bb->succs) == 0)
! 	make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
        break;
  
      default:
*************** make_exit_edges (basic_block bb)
*** 592,598 ****
  	 CFG.  */
        if (call_expr_flags (last) & ECF_NORETURN)
  	{
! 	  make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  	  return;
  	}
  
--- 592,598 ----
  	 CFG.  */
        if (call_expr_flags (last) & ECF_NORETURN)
  	{
! 	  make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  	  return;
  	}
  
*************** make_goto_expr_edges (basic_block bb)
*** 953,959 ****
  
    /* Degenerate case of computed goto with no labels.  */
    if (!for_call && EDGE_COUNT (bb->succs) == 0)
!     make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  }
  
  
--- 953,959 ----
  
    /* Degenerate case of computed goto with no labels.  */
    if (!for_call && EDGE_COUNT (bb->succs) == 0)
!     make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  }
  
  
*************** tree_can_merge_blocks_p (basic_block a, 
*** 1252,1258 ****
    if (!single_pred_p (b))
      return false;
  
!   if (b == EXIT_BLOCK_PTR)
      return false;
    
    /* If A ends by a statement causing exceptions or something similar, we
--- 1252,1258 ----
    if (!single_pred_p (b))
      return false;
  
!   if (b == cfun->cfg->exit_block_ptr)
      return false;
    
    /* If A ends by a statement causing exceptions or something similar, we
*************** tree_cfg2vcg (FILE *file)
*** 2448,2454 ****
    fprintf (file, "node: { title: \"EXIT\" label: \"EXIT\" }\n");
  
    /* Write blocks and edges.  */
!   FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
      {
        fprintf (file, "edge: { sourcename: \"ENTRY\" targetname: \"%d\"",
  	       e->dest->index);
--- 2448,2454 ----
    fprintf (file, "node: { title: \"EXIT\" label: \"EXIT\" }\n");
  
    /* Write blocks and edges.  */
!   FOR_EACH_EDGE (e, ei, cfun->cfg->entry_block_ptr->succs)
      {
        fprintf (file, "edge: { sourcename: \"ENTRY\" targetname: \"%d\"",
  	       e->dest->index);
*************** tree_cfg2vcg (FILE *file)
*** 2495,2501 ****
  
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == EXIT_BLOCK_PTR)
  	    fprintf (file, "edge: { sourcename: \"%d\" targetname: \"EXIT\"", bb->index);
  	  else
  	    fprintf (file, "edge: { sourcename: \"%d\" targetname: \"%d\"", bb->index, e->dest->index);
--- 2495,2501 ----
  
        FOR_EACH_EDGE (e, ei, bb->succs)
  	{
! 	  if (e->dest == cfun->cfg->exit_block_ptr)
  	    fprintf (file, "edge: { sourcename: \"%d\" targetname: \"EXIT\"", bb->index);
  	  else
  	    fprintf (file, "edge: { sourcename: \"%d\" targetname: \"%d\"", bb->index, e->dest->index);
*************** tree_cfg2vcg (FILE *file)
*** 2508,2514 ****
  	  fprintf (file, " }\n");
  	}
  
!       if (bb->next_bb != EXIT_BLOCK_PTR)
  	fputc ('\n', file);
      }
  
--- 2508,2514 ----
  	  fprintf (file, " }\n");
  	}
  
!       if (bb->next_bb != cfun->cfg->exit_block_ptr)
  	fputc ('\n', file);
      }
  
*************** disband_implicit_edges (void)
*** 2675,2683 ****
  	  /* Remove the RETURN_EXPR if we may fall though to the exit
  	     instead.  */
  	  gcc_assert (single_succ_p (bb));
! 	  gcc_assert (single_succ (bb) == EXIT_BLOCK_PTR);
  
! 	  if (bb->next_bb == EXIT_BLOCK_PTR
  	      && !TREE_OPERAND (stmt, 0))
  	    {
  	      bsi_remove (&last, true);
--- 2675,2683 ----
  	  /* Remove the RETURN_EXPR if we may fall though to the exit
  	     instead.  */
  	  gcc_assert (single_succ_p (bb));
! 	  gcc_assert (single_succ (bb) == cfun->cfg->exit_block_ptr);
  
! 	  if (bb->next_bb == cfun->cfg->exit_block_ptr
  	      && !TREE_OPERAND (stmt, 0))
  	    {
  	      bsi_remove (&last, true);
*************** disband_implicit_edges (void)
*** 2699,2705 ****
        if (!e || e->dest == bb->next_bb)
  	continue;
  
!       gcc_assert (e->dest != EXIT_BLOCK_PTR);
        label = tree_block_label (e->dest);
  
        stmt = build1 (GOTO_EXPR, void_type_node, label);
--- 2699,2705 ----
        if (!e || e->dest == bb->next_bb)
  	continue;
  
!       gcc_assert (e->dest != cfun->cfg->exit_block_ptr);
        label = tree_block_label (e->dest);
  
        stmt = build1 (GOTO_EXPR, void_type_node, label);
*************** tree_find_edge_insert_loc (edge e, block
*** 3017,3023 ****
       hardly seems worth the effort.  */
    if (single_pred_p (dest)
        && ! phi_nodes (dest)
!       && dest != EXIT_BLOCK_PTR)
      {
        *bsi = bsi_start (dest);
        if (bsi_end_p (*bsi))
--- 3017,3023 ----
       hardly seems worth the effort.  */
    if (single_pred_p (dest)
        && ! phi_nodes (dest)
!       && dest != cfun->cfg->exit_block_ptr)
      {
        *bsi = bsi_start (dest);
        if (bsi_end_p (*bsi))
*************** tree_find_edge_insert_loc (edge e, block
*** 3048,3054 ****
    src = e->src;
    if ((e->flags & EDGE_ABNORMAL) == 0
        && single_succ_p (src)
!       && src != ENTRY_BLOCK_PTR)
      {
        *bsi = bsi_last (src);
        if (bsi_end_p (*bsi))
--- 3048,3054 ----
    src = e->src;
    if ((e->flags & EDGE_ABNORMAL) == 0
        && single_succ_p (src)
!       && src != cfun->cfg->entry_block_ptr)
      {
        *bsi = bsi_last (src);
        if (bsi_end_p (*bsi))
*************** bsi_commit_edge_inserts (void)
*** 3093,3099 ****
    edge e;
    edge_iterator ei;
  
!   bsi_commit_one_edge_insert (single_succ_edge (ENTRY_BLOCK_PTR), NULL);
  
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
--- 3093,3099 ----
    edge e;
    edge_iterator ei;
  
!   bsi_commit_one_edge_insert (single_succ_edge (cfun->cfg->entry_block_ptr), NULL);
  
    FOR_EACH_BB (bb)
      FOR_EACH_EDGE (e, ei, bb->succs)
*************** tree_verify_flow_info (void)
*** 3696,3714 ****
    edge e;
    edge_iterator ei;
  
!   if (ENTRY_BLOCK_PTR->stmt_list)
      {
        error ("ENTRY_BLOCK has a statement list associated with it");
        err = 1;
      }
  
!   if (EXIT_BLOCK_PTR->stmt_list)
      {
        error ("EXIT_BLOCK has a statement list associated with it");
        err = 1;
      }
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      if (e->flags & EDGE_FALLTHRU)
        {
  	error ("fallthru to exit from bb %d", e->src->index);
--- 3696,3714 ----
    edge e;
    edge_iterator ei;
  
!   if (cfun->cfg->entry_block_ptr->stmt_list)
      {
        error ("ENTRY_BLOCK has a statement list associated with it");
        err = 1;
      }
  
!   if (cfun->cfg->exit_block_ptr->stmt_list)
      {
        error ("EXIT_BLOCK has a statement list associated with it");
        err = 1;
      }
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      if (e->flags & EDGE_FALLTHRU)
        {
  	error ("fallthru to exit from bb %d", e->src->index);
*************** tree_verify_flow_info (void)
*** 3879,3885 ****
  	      error ("wrong outgoing edge flags at end of bb %d", bb->index);
  	      err = 1;
  	    }
! 	  if (single_succ (bb) != EXIT_BLOCK_PTR)
  	    {
  	      error ("return edge does not point to exit in bb %d",
  		     bb->index);
--- 3879,3885 ----
  	      error ("wrong outgoing edge flags at end of bb %d", bb->index);
  	      err = 1;
  	    }
! 	  if (single_succ (bb) != cfun->cfg->exit_block_ptr)
  	    {
  	      error ("return edge does not point to exit in bb %d",
  		     bb->index);
*************** tree_redirect_edge_and_branch (edge e, b
*** 4108,4114 ****
    if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
      return NULL;
  
!   if (e->src != ENTRY_BLOCK_PTR 
        && (ret = tree_try_redirect_by_replacing_jump (e, dest)))
      return ret;
  
--- 4108,4114 ----
    if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
      return NULL;
  
!   if (e->src != cfun->cfg->entry_block_ptr 
        && (ret = tree_try_redirect_by_replacing_jump (e, dest)))
      return ret;
  
*************** tree_duplicate_bb (basic_block bb)
*** 4299,4305 ****
    block_stmt_iterator bsi, bsi_tgt;
    tree phi;
  
!   new_bb = create_empty_bb (EXIT_BLOCK_PTR->prev_bb);
  
    /* Copy the PHI nodes.  We ignore PHI node arguments here because
       the incoming edges have not been setup yet.  */
--- 4299,4305 ----
    block_stmt_iterator bsi, bsi_tgt;
    tree phi;
  
!   new_bb = create_empty_bb (cfun->cfg->exit_block_ptr->prev_bb);
  
    /* Copy the PHI nodes.  We ignore PHI node arguments here because
       the incoming edges have not been setup yet.  */
*************** move_sese_region_to_fn (struct function 
*** 4818,4824 ****
  
    /* Move blocks from BBS into DEST_CFUN.  */
    gcc_assert (VEC_length (basic_block, bbs) >= 2);
!   after = dest_cfun->cfg->x_entry_block_ptr;
    vars_to_remove = BITMAP_ALLOC (NULL);
    for (i = 0; VEC_iterate (basic_block, bbs, i, bb); i++)
      {
--- 4818,4824 ----
  
    /* Move blocks from BBS into DEST_CFUN.  */
    gcc_assert (VEC_length (basic_block, bbs) >= 2);
!   after = dest_cfun->cfg->entry_block_ptr;
    vars_to_remove = BITMAP_ALLOC (NULL);
    for (i = 0; VEC_iterate (basic_block, bbs, i, bb); i++)
      {
*************** move_sese_region_to_fn (struct function 
*** 4852,4868 ****
    BITMAP_FREE (vars_to_remove);
  
    /* Rewire the entry and exit blocks.  The successor to the entry
!      block turns into the successor of DEST_FN's ENTRY_BLOCK_PTR in
       the child function.  Similarly, the predecessor of DEST_FN's
!      EXIT_BLOCK_PTR turns into the predecessor of EXIT_BLOCK_PTR.  We
       need to switch CFUN between DEST_CFUN and SAVED_CFUN so that the
       various CFG manipulation function get to the right CFG.
  
       FIXME, this is silly.  The CFG ought to become a parameter to
       these helpers.  */
    cfun = dest_cfun;
!   make_edge (ENTRY_BLOCK_PTR, entry_bb, EDGE_FALLTHRU);
!   make_edge (exit_bb,  EXIT_BLOCK_PTR, 0);
    cfun = saved_cfun;
  
    /* Back in the original function, the SESE region has disappeared,
--- 4852,4868 ----
    BITMAP_FREE (vars_to_remove);
  
    /* Rewire the entry and exit blocks.  The successor to the entry
!      block turns into the successor of DEST_FN's cfun->cfg->entry_block_ptr in
       the child function.  Similarly, the predecessor of DEST_FN's
!      cfun->cfg->exit_block_ptr turns into the predecessor of cfun->cfg->exit_block_ptr.  We
       need to switch CFUN between DEST_CFUN and SAVED_CFUN so that the
       various CFG manipulation function get to the right CFG.
  
       FIXME, this is silly.  The CFG ought to become a parameter to
       these helpers.  */
    cfun = dest_cfun;
!   make_edge (cfun->cfg->entry_block_ptr, entry_bb, EDGE_FALLTHRU);
!   make_edge (exit_bb,  cfun->cfg->exit_block_ptr, 0);
    cfun = saved_cfun;
  
    /* Back in the original function, the SESE region has disappeared,
*************** dump_function_to_file (tree fn, FILE *fi
*** 4942,4948 ****
    if (cfun && cfun->decl == fn && cfun->cfg && basic_block_info)
      {
        /* Make a CFG based dump.  */
!       check_bb_profile (ENTRY_BLOCK_PTR, file);
        if (!ignore_topmost_bind)
  	fprintf (file, "{\n");
  
--- 4942,4948 ----
    if (cfun && cfun->decl == fn && cfun->cfg && basic_block_info)
      {
        /* Make a CFG based dump.  */
!       check_bb_profile (cfun->cfg->entry_block_ptr, file);
        if (!ignore_topmost_bind)
  	fprintf (file, "{\n");
  
*************** dump_function_to_file (tree fn, FILE *fi
*** 4953,4959 ****
  	dump_generic_bb (file, bb, 2, flags);
  	
        fprintf (file, "}\n");
!       check_bb_profile (EXIT_BLOCK_PTR, file);
      }
    else
      {
--- 4953,4959 ----
  	dump_generic_bb (file, bb, 2, flags);
  	
        fprintf (file, "}\n");
!       check_bb_profile (cfun->cfg->exit_block_ptr, file);
      }
    else
      {
*************** tree_flow_call_edges_add (sbitmap blocks
*** 5173,5179 ****
    if (! blocks)
      check_last_block = true;
    else
!     check_last_block = TEST_BIT (blocks, EXIT_BLOCK_PTR->prev_bb->index);
  
    /* In the last basic block, before epilogue generation, there will be
       a fallthru edge to EXIT.  Special care is required if the last insn
--- 5173,5179 ----
    if (! blocks)
      check_last_block = true;
    else
!     check_last_block = TEST_BIT (blocks, cfun->cfg->exit_block_ptr->prev_bb->index);
  
    /* In the last basic block, before epilogue generation, there will be
       a fallthru edge to EXIT.  Special care is required if the last insn
*************** tree_flow_call_edges_add (sbitmap blocks
*** 5189,5195 ****
       Handle this by adding a dummy instruction in a new last basic block.  */
    if (check_last_block)
      {
!       basic_block bb = EXIT_BLOCK_PTR->prev_bb;
        block_stmt_iterator bsi = bsi_last (bb);
        tree t = NULL_TREE;
        if (!bsi_end_p (bsi))
--- 5189,5195 ----
       Handle this by adding a dummy instruction in a new last basic block.  */
    if (check_last_block)
      {
!       basic_block bb = cfun->cfg->exit_block_ptr->prev_bb;
        block_stmt_iterator bsi = bsi_last (bb);
        tree t = NULL_TREE;
        if (!bsi_end_p (bsi))
*************** tree_flow_call_edges_add (sbitmap blocks
*** 5199,5205 ****
  	{
  	  edge e;
  
! 	  e = find_edge (bb, EXIT_BLOCK_PTR);
  	  if (e)
  	    {
  	      bsi_insert_on_edge (e, build_empty_stmt ());
--- 5199,5205 ----
  	{
  	  edge e;
  
! 	  e = find_edge (bb, cfun->cfg->exit_block_ptr);
  	  if (e)
  	    {
  	      bsi_insert_on_edge (e, build_empty_stmt ());
*************** tree_flow_call_edges_add (sbitmap blocks
*** 5241,5247 ****
  #ifdef ENABLE_CHECKING
  		  if (stmt == last_stmt)
  		    {
! 		      e = find_edge (bb, EXIT_BLOCK_PTR);
  		      gcc_assert (e == NULL);
  		    }
  #endif
--- 5241,5247 ----
  #ifdef ENABLE_CHECKING
  		  if (stmt == last_stmt)
  		    {
! 		      e = find_edge (bb, cfun->cfg->exit_block_ptr);
  		      gcc_assert (e == NULL);
  		    }
  #endif
*************** tree_flow_call_edges_add (sbitmap blocks
*** 5254,5260 ****
  		      if (e)
  			blocks_split++;
  		    }
! 		  make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  		}
  	      bsi_prev (&bsi);
  	    }
--- 5254,5260 ----
  		      if (e)
  			blocks_split++;
  		    }
! 		  make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  		}
  	      bsi_prev (&bsi);
  	    }
*************** execute_warn_function_return (void)
*** 5578,5591 ****
  
    /* If we have a path to EXIT, then we do return.  */
    if (TREE_THIS_VOLATILE (cfun->decl)
!       && EDGE_COUNT (EXIT_BLOCK_PTR->preds) > 0)
      {
  #ifdef USE_MAPPED_LOCATION
        location = UNKNOWN_LOCATION;
  #else
        locus = NULL;
  #endif
!       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
  	{
  	  last = last_stmt (e->src);
  	  if (TREE_CODE (last) == RETURN_EXPR
--- 5578,5591 ----
  
    /* If we have a path to EXIT, then we do return.  */
    if (TREE_THIS_VOLATILE (cfun->decl)
!       && EDGE_COUNT (cfun->cfg->exit_block_ptr->preds) > 0)
      {
  #ifdef USE_MAPPED_LOCATION
        location = UNKNOWN_LOCATION;
  #else
        locus = NULL;
  #endif
!       FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
  	{
  	  last = last_stmt (e->src);
  	  if (TREE_CODE (last) == RETURN_EXPR
*************** execute_warn_function_return (void)
*** 5611,5620 ****
       without returning a value.  */
    else if (warn_return_type
  	   && !TREE_NO_WARNING (cfun->decl)
! 	   && EDGE_COUNT (EXIT_BLOCK_PTR->preds) > 0
  	   && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (cfun->decl))))
      {
!       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
  	{
  	  tree last = last_stmt (e->src);
  	  if (TREE_CODE (last) == RETURN_EXPR
--- 5611,5620 ----
       without returning a value.  */
    else if (warn_return_type
  	   && !TREE_NO_WARNING (cfun->decl)
! 	   && EDGE_COUNT (cfun->cfg->exit_block_ptr->preds) > 0
  	   && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (cfun->decl))))
      {
!       FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
  	{
  	  tree last = last_stmt (e->src);
  	  if (TREE_CODE (last) == RETURN_EXPR
*************** execute_warn_function_noreturn (void)
*** 5689,5695 ****
  {
    if (warn_missing_noreturn
        && !TREE_THIS_VOLATILE (cfun->decl)
!       && EDGE_COUNT (EXIT_BLOCK_PTR->preds) == 0
        && !lang_hooks.function.missing_noreturn_ok_p (cfun->decl))
      warning (OPT_Wmissing_noreturn, "%Jfunction might be possible candidate "
  	     "for attribute %<noreturn%>",
--- 5689,5695 ----
  {
    if (warn_missing_noreturn
        && !TREE_THIS_VOLATILE (cfun->decl)
!       && EDGE_COUNT (cfun->cfg->exit_block_ptr->preds) == 0
        && !lang_hooks.function.missing_noreturn_ok_p (cfun->decl))
      warning (OPT_Wmissing_noreturn, "%Jfunction might be possible candidate "
  	     "for attribute %<noreturn%>",
Index: tree-ssa-reassoc.c
===================================================================
-c -L tree-ssa-reassoc.c	(revision 112224) -L tree-ssa-reassoc.c	(working copy) .svn/text-base/tree-ssa-reassoc.c.svn-base tree-ssa-reassoc.c
*** tree-ssa-reassoc.c	(revision 112224)
--- tree-ssa-reassoc.c	(working copy)
*************** debug_ops_vector (VEC (operand_entry_t, 
*** 1403,1410 ****
  static void
  do_reassoc (void)
  {
!   break_up_subtract_bb (ENTRY_BLOCK_PTR);
!   reassociate_bb (EXIT_BLOCK_PTR);
  }
  
  /* Initialize the reassociation pass.  */
--- 1403,1410 ----
  static void
  do_reassoc (void)
  {
!   break_up_subtract_bb (cfun->cfg->entry_block_ptr);
!   reassociate_bb (cfun->cfg->exit_block_ptr);
  }
  
  /* Initialize the reassociation pass.  */
Index: config/frv/frv.c
===================================================================
-c -L config/frv/frv.c	(revision 112224) -L config/frv/frv.c	(working copy) config/frv/.svn/text-base/frv.c.svn-base config/frv/frv.c
*** config/frv/frv.c	(revision 112224)
--- config/frv/frv.c	(working copy)
*************** frv_optimize_membar_global (basic_block 
*** 7962,7968 ****
    /* We need to keep the membar if there is an edge to the exit block.  */
    FOR_EACH_EDGE (succ, ei, bb->succs)
    /* for (succ = bb->succ; succ != 0; succ = succ->succ_next) */
!     if (succ->dest == EXIT_BLOCK_PTR)
        return;
  
    /* Work out the union of all successor blocks.  */
--- 7962,7968 ----
    /* We need to keep the membar if there is an edge to the exit block.  */
    FOR_EACH_EDGE (succ, ei, bb->succs)
    /* for (succ = bb->succ; succ != 0; succ = succ->succ_next) */
!     if (succ->dest == cfun->cfg->exit_block_ptr)
        return;
  
    /* Work out the union of all successor blocks.  */
Index: config/i386/i386.c
===================================================================
-c -L config/i386/i386.c	(revision 112224) -L config/i386/i386.c	(working copy) config/i386/.svn/text-base/i386.c.svn-base config/i386/i386.c
*** config/i386/i386.c	(revision 112224)
--- config/i386/i386.c	(working copy)
*************** ix86_eax_live_at_start_p (void)
*** 2561,2567 ****
       to correct at this point.  This gives false positives for broken
       functions that might use uninitialized data that happens to be
       allocated in eax, but who cares?  */
!   return REGNO_REG_SET_P (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end, 0);
  }
  
  /* Value is the number of bytes of arguments automatically
--- 2561,2568 ----
       to correct at this point.  This gives false positives for broken
       functions that might use uninitialized data that happens to be
       allocated in eax, but who cares?  */
!   return REGNO_REG_SET_P (cfun->cfg->entry_block_ptr->il.rtl->global_live_at_end,
! 			  0);
  }
  
  /* Value is the number of bytes of arguments automatically
*************** ix86_pad_returns (void)
*** 17643,17649 ****
    edge e;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
      {
        basic_block bb = e->src;
        rtx ret = BB_END (bb);
--- 17644,17650 ----
    edge e;
    edge_iterator ei;
  
!   FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
      {
        basic_block bb = e->src;
        rtx ret = BB_END (bb);
Index: config/sh/sh.c
===================================================================
-c -L config/sh/sh.c	(revision 112224) -L config/sh/sh.c	(working copy) config/sh/.svn/text-base/sh.c.svn-base config/sh/sh.c
*** config/sh/sh.c	(revision 112224)
--- config/sh/sh.c	(working copy)
*************** sh_output_mi_thunk (FILE *file, tree thu
*** 9919,9928 ****
        if (! cfun->cfg)
  	init_flow ();
        rtl_register_cfg_hooks ();
!       init_rtl_bb_info (ENTRY_BLOCK_PTR);
!       init_rtl_bb_info (EXIT_BLOCK_PTR);
!       ENTRY_BLOCK_PTR->flags |= BB_RTL;
!       EXIT_BLOCK_PTR->flags |= BB_RTL;
        find_basic_blocks (insns);
  
        if (flag_schedule_insns_after_reload)
--- 9919,9928 ----
        if (! cfun->cfg)
  	init_flow ();
        rtl_register_cfg_hooks ();
!       init_rtl_bb_info (cfun->cfg->entry_block_ptr);
!       init_rtl_bb_info (cfun->cfg->exit_block_ptr);
!       cfun->cfg->entry_block_ptr->flags |= BB_RTL;
!       cfun->cfg->exit_block_ptr->flags |= BB_RTL;
        find_basic_blocks (insns);
  
        if (flag_schedule_insns_after_reload)
Index: config/mt/mt.c
===================================================================
-c -L config/mt/mt.c	(revision 112224) -L config/mt/mt.c	(working copy) config/mt/.svn/text-base/mt.c.svn-base config/mt/mt.c
*** config/mt/mt.c	(revision 112224)
--- config/mt/mt.c	(working copy)
*************** mt_reorg_loops (FILE *dump_file)
*** 1959,1965 ****
      {
        loop = work->loop;
        bb = work->block;
!       if (bb == EXIT_BLOCK_PTR)
  	/* We've reached the exit block.  The loop must be bad. */
  	loop->depth = -1;
        else if (!bb->aux)
--- 1959,1965 ----
      {
        loop = work->loop;
        bb = work->block;
!       if (bb == cfun->cfg->exit_block_ptr)
  	/* We've reached the exit block.  The loop must be bad. */
  	loop->depth = -1;
        else if (!bb->aux)
Index: config/ia64/ia64.c
===================================================================
-c -L config/ia64/ia64.c	(revision 112224) -L config/ia64/ia64.c	(working copy) config/ia64/.svn/text-base/ia64.c.svn-base config/ia64/ia64.c
*** config/ia64/ia64.c	(revision 112224)
--- config/ia64/ia64.c	(working copy)
*************** ia64_expand_prologue (void)
*** 2912,2918 ****
        edge e;
        edge_iterator ei;
  
!       FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
  	if ((e->flags & EDGE_FAKE) == 0
  	    && (e->flags & EDGE_FALLTHRU) != 0)
  	  break;
--- 2912,2918 ----
        edge e;
        edge_iterator ei;
  
!       FOR_EACH_EDGE (e, ei, cfun->cfg->exit_block_ptr->preds)
  	if ((e->flags & EDGE_FAKE) == 0
  	    && (e->flags & EDGE_FALLTHRU) != 0)
  	  break;
*************** process_for_unwind_directive (FILE *asm_
*** 8998,9004 ****
        if (GET_CODE (insn) == NOTE
  	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
! 	  last_block = NOTE_BASIC_BLOCK (insn)->next_bb == EXIT_BLOCK_PTR;
  
  	  /* Restore unwind state from immediately before the epilogue.  */
  	  if (need_copy_state)
--- 8998,9005 ----
        if (GET_CODE (insn) == NOTE
  	  && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
  	{
! 	  last_block =
!             NOTE_BASIC_BLOCK (insn)->next_bb == cfun->cfg->exit_block_ptr;
  
  	  /* Restore unwind state from immediately before the epilogue.  */
  	  if (need_copy_state)
Index: config/rs6000/rs6000.c
===================================================================
-c -L config/rs6000/rs6000.c	(revision 112224) -L config/rs6000/rs6000.c	(working copy) config/rs6000/.svn/text-base/rs6000.c.svn-base config/rs6000/rs6000.c
*** config/rs6000/rs6000.c	(revision 112224)
--- config/rs6000/rs6000.c	(working copy)
*************** rs6000_emit_prologue (void)
*** 14599,14605 ****
  				      && DEFAULT_ABI != ABI_AIX
  				      && flag_pic
  				      && ! info->lr_save_p
! 				      && EDGE_COUNT (EXIT_BLOCK_PTR->preds) > 0);
        if (save_LR_around_toc_setup)
  	{
  	  rtx lr = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM);
--- 14599,14605 ----
  				      && DEFAULT_ABI != ABI_AIX
  				      && flag_pic
  				      && ! info->lr_save_p
! 				      && EDGE_COUNT (cfun->cfg->exit_block_ptr->preds) > 0);
        if (save_LR_around_toc_setup)
  	{
  	  rtx lr = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM);
Index: cfgrtl.c
===================================================================
-c -L cfgrtl.c	(revision 112224) -L cfgrtl.c	(working copy) .svn/text-base/cfgrtl.c.svn-base cfgrtl.c
*** cfgrtl.c	(revision 112224)
--- cfgrtl.c	(working copy)
*************** rtx
*** 444,450 ****
  entry_of_function (void)
  {
    return (n_basic_blocks > NUM_FIXED_BLOCKS ? 
! 	  BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ());
  }
  
  /* Update insns block within BB.  */
--- 444,450 ----
  entry_of_function (void)
  {
    return (n_basic_blocks > NUM_FIXED_BLOCKS ? 
! 	  BB_HEAD (cfun->cfg->entry_block_ptr->next_bb) : get_insns ());
  }
  
  /* Update insns block within BB.  */
*************** rtl_can_merge_blocks (basic_block a,basi
*** 648,654 ****
  	  /* Must be simple edge.  */
  	  && !(single_succ_edge (a)->flags & EDGE_COMPLEX)
  	  && a->next_bb == b
! 	  && a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR
  	  /* If the jump insn has side effects,
  	     we can't kill the edge.  */
  	  && (!JUMP_P (BB_END (a))
--- 648,654 ----
  	  /* Must be simple edge.  */
  	  && !(single_succ_edge (a)->flags & EDGE_COMPLEX)
  	  && a->next_bb == b
! 	  && a != cfun->cfg->entry_block_ptr && b != cfun->cfg->exit_block_ptr
  	  /* If the jump insn has side effects,
  	     we can't kill the edge.  */
  	  && (!JUMP_P (BB_END (a))
*************** rtl_can_merge_blocks (basic_block a,basi
*** 662,668 ****
  rtx
  block_label (basic_block block)
  {
!   if (block == EXIT_BLOCK_PTR)
      return NULL_RTX;
  
    if (!LABEL_P (BB_HEAD (block)))
--- 662,668 ----
  rtx
  block_label (basic_block block)
  {
!   if (block == cfun->cfg->exit_block_ptr)
      return NULL_RTX;
  
    if (!LABEL_P (BB_HEAD (block)))
*************** try_redirect_by_replacing_jump (edge e, 
*** 773,785 ****
  		 INSN_UID (insn), e->dest->index, target->index);
        if (!redirect_jump (insn, block_label (target), 0))
  	{
! 	  gcc_assert (target == EXIT_BLOCK_PTR);
  	  return NULL;
  	}
      }
  
    /* Cannot do anything for target exit block.  */
!   else if (target == EXIT_BLOCK_PTR)
      return NULL;
  
    /* Or replace possibly complicated jump insn by simple jump insn.  */
--- 773,785 ----
  		 INSN_UID (insn), e->dest->index, target->index);
        if (!redirect_jump (insn, block_label (target), 0))
  	{
! 	  gcc_assert (target == cfun->cfg->exit_block_ptr);
  	  return NULL;
  	}
      }
  
    /* Cannot do anything for target exit block.  */
!   else if (target == cfun->cfg->exit_block_ptr)
      return NULL;
  
    /* Or replace possibly complicated jump insn by simple jump insn.  */
*************** redirect_branch_edge (edge e, basic_bloc
*** 882,888 ****
        int j;
        rtx new_label = block_label (target);
  
!       if (target == EXIT_BLOCK_PTR)
  	return NULL;
        if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
  	vec = XVEC (PATTERN (tmp), 0);
--- 882,888 ----
        int j;
        rtx new_label = block_label (target);
  
!       if (target == cfun->cfg->exit_block_ptr)
  	return NULL;
        if (GET_CODE (PATTERN (tmp)) == ADDR_VEC)
  	vec = XVEC (PATTERN (tmp), 0);
*************** redirect_branch_edge (edge e, basic_bloc
*** 928,934 ****
  	 target is exit block on some arches.  */
        if (!redirect_jump (insn, block_label (target), 0))
  	{
! 	  gcc_assert (target == EXIT_BLOCK_PTR);
  	  return NULL;
  	}
      }
--- 928,934 ----
  	 target is exit block on some arches.  */
        if (!redirect_jump (insn, block_label (target), 0))
  	{
! 	  gcc_assert (target == cfun->cfg->exit_block_ptr);
  	  return NULL;
  	}
      }
*************** force_nonfallthru_and_redirect (edge e, 
*** 993,999 ****
    /* In the case the last instruction is conditional jump to the next
       instruction, first redirect the jump itself and then continue
       by creating a basic block afterwards to redirect fallthru edge.  */
!   if (e->src != ENTRY_BLOCK_PTR && e->dest != EXIT_BLOCK_PTR
        && any_condjump_p (BB_END (e->src))
        && JUMP_LABEL (BB_END (e->src)) == BB_HEAD (e->dest))
      {
--- 993,999 ----
    /* In the case the last instruction is conditional jump to the next
       instruction, first redirect the jump itself and then continue
       by creating a basic block afterwards to redirect fallthru edge.  */
!   if (e->src != cfun->cfg->entry_block_ptr && e->dest != cfun->cfg->exit_block_ptr
        && any_condjump_p (BB_END (e->src))
        && JUMP_LABEL (BB_END (e->src)) == BB_HEAD (e->dest))
      {
*************** force_nonfallthru_and_redirect (edge e, 
*** 1034,1040 ****
    else
      {
        gcc_assert (e->flags & EDGE_FALLTHRU);
!       if (e->src == ENTRY_BLOCK_PTR)
  	{
  	  /* We can't redirect the entry block.  Create an empty block
  	     at the start of the function which we use to add the new
--- 1034,1040 ----
    else
      {
        gcc_assert (e->flags & EDGE_FALLTHRU);
!       if (e->src == cfun->cfg->entry_block_ptr)
  	{
  	  /* We can't redirect the entry block.  Create an empty block
  	     at the start of the function which we use to add the new
*************** force_nonfallthru_and_redirect (edge e, 
*** 1043,1058 ****
  	  edge_iterator ei;
  	  bool found = false;
  	  
! 	  basic_block bb = create_basic_block (BB_HEAD (e->dest), NULL, ENTRY_BLOCK_PTR);
  	  
  	  /* Change the existing edge's source to be the new block, and add
  	     a new edge from the entry block to the new block.  */
  	  e->src = bb;
! 	  for (ei = ei_start (ENTRY_BLOCK_PTR->succs); (tmp = ei_safe_edge (ei)); )
  	    {
  	      if (tmp == e)
  		{
! 		  VEC_unordered_remove (edge, ENTRY_BLOCK_PTR->succs, ei.index);
  		  found = true;
  		  break;
  		}
--- 1043,1058 ----
  	  edge_iterator ei;
  	  bool found = false;
  	  
! 	  basic_block bb = create_basic_block (BB_HEAD (e->dest), NULL, cfun->cfg->entry_block_ptr);
  	  
  	  /* Change the existing edge's source to be the new block, and add
  	     a new edge from the entry block to the new block.  */
  	  e->src = bb;
! 	  for (ei = ei_start (cfun->cfg->entry_block_ptr->succs); (tmp = ei_safe_edge (ei)); )
  	    {
  	      if (tmp == e)
  		{
! 		  VEC_unordered_remove (edge, cfun->cfg->entry_block_ptr->succs, ei.index);
  		  found = true;
  		  break;
  		}
*************** force_nonfallthru_and_redirect (edge e, 
*** 1063,1069 ****
  	  gcc_assert (found);
  	  
  	  VEC_safe_push (edge, gc, bb->succs, e);
! 	  make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU);
  	}
      }
  
--- 1063,1069 ----
  	  gcc_assert (found);
  	  
  	  VEC_safe_push (edge, gc, bb->succs, e);
! 	  make_single_succ_edge (cfun->cfg->entry_block_ptr, bb, EDGE_FALLTHRU);
  	}
      }
  
*************** force_nonfallthru_and_redirect (edge e, 
*** 1122,1128 ****
      jump_block = e->src;
  
    e->flags &= ~EDGE_FALLTHRU;
!   if (target == EXIT_BLOCK_PTR)
      {
  #ifdef HAVE_return
  	emit_jump_insn_after_noloc (gen_return (), BB_END (jump_block));
--- 1122,1128 ----
      jump_block = e->src;
  
    e->flags &= ~EDGE_FALLTHRU;
!   if (target == cfun->cfg->exit_block_ptr)
      {
  #ifdef HAVE_return
  	emit_jump_insn_after_noloc (gen_return (), BB_END (jump_block));
*************** rtl_split_edge (edge edge_in)
*** 1268,1281 ****
      }
  
    /* Create the basic block note.  */
!   if (edge_in->dest != EXIT_BLOCK_PTR)
      before = BB_HEAD (edge_in->dest);
    else
      before = NULL_RTX;
  
    /* If this is a fall through edge to the exit block, the blocks might be
       not adjacent, and the right place is the after the source.  */
!   if (edge_in->flags & EDGE_FALLTHRU && edge_in->dest == EXIT_BLOCK_PTR)
      {
        before = NEXT_INSN (BB_END (edge_in->src));
        bb = create_basic_block (before, NULL, edge_in->src);
--- 1268,1281 ----
      }
  
    /* Create the basic block note.  */
!   if (edge_in->dest != cfun->cfg->exit_block_ptr)
      before = BB_HEAD (edge_in->dest);
    else
      before = NULL_RTX;
  
    /* If this is a fall through edge to the exit block, the blocks might be
       not adjacent, and the right place is the after the source.  */
!   if (edge_in->flags & EDGE_FALLTHRU && edge_in->dest == cfun->cfg->exit_block_ptr)
      {
        before = NEXT_INSN (BB_END (edge_in->src));
        bb = create_basic_block (before, NULL, edge_in->src);
*************** commit_one_edge_insertion (edge e, int w
*** 1454,1460 ****
       its return value.  */
    if (watch_calls && (e->flags & EDGE_FALLTHRU)
        && single_pred_p (e->dest)
!       && e->src != ENTRY_BLOCK_PTR
        && CALL_P (BB_END (e->src)))
      {
        rtx next = next_nonnote_insn (BB_END (e->src));
--- 1454,1460 ----
       its return value.  */
    if (watch_calls && (e->flags & EDGE_FALLTHRU)
        && single_pred_p (e->dest)
!       && e->src != cfun->cfg->entry_block_ptr
        && CALL_P (BB_END (e->src)))
      {
        rtx next = next_nonnote_insn (BB_END (e->src));
*************** commit_one_edge_insertion (edge e, int w
*** 1473,1479 ****
      {
        /* Figure out where to put these things.  If the destination has
           one predecessor, insert there.  Except for the exit block.  */
!       if (single_pred_p (e->dest) && e->dest != EXIT_BLOCK_PTR)
  	{
  	  bb = e->dest;
  
--- 1473,1479 ----
      {
        /* Figure out where to put these things.  If the destination has
           one predecessor, insert there.  Except for the exit block.  */
!       if (single_pred_p (e->dest) && e->dest != cfun->cfg->exit_block_ptr)
  	{
  	  bb = e->dest;
  
*************** commit_one_edge_insertion (edge e, int w
*** 1496,1502 ****
           insert there.  Except for the entry block.  */
        else if ((e->flags & EDGE_ABNORMAL) == 0
  	       && single_succ_p (e->src)
! 	       && e->src != ENTRY_BLOCK_PTR)
  	{
  	  bb = e->src;
  
--- 1496,1502 ----
           insert there.  Except for the entry block.  */
        else if ((e->flags & EDGE_ABNORMAL) == 0
  	       && single_succ_p (e->src)
! 	       && e->src != cfun->cfg->entry_block_ptr)
  	{
  	  bb = e->src;
  
*************** commit_one_edge_insertion (edge e, int w
*** 1525,1531 ****
  
  	  if (flag_reorder_blocks_and_partition
  	      && targetm.have_named_sections
! 	      && e->src != ENTRY_BLOCK_PTR
  	      && BB_PARTITION (e->src) == BB_COLD_PARTITION
  	      && !(e->flags & EDGE_CROSSING))
  	    {
--- 1525,1531 ----
  
  	  if (flag_reorder_blocks_and_partition
  	      && targetm.have_named_sections
! 	      && e->src != cfun->cfg->entry_block_ptr
  	      && BB_PARTITION (e->src) == BB_COLD_PARTITION
  	      && !(e->flags & EDGE_CROSSING))
  	    {
*************** commit_one_edge_insertion (edge e, int w
*** 1568,1574 ****
           to EXIT.  */
  
        e = single_succ_edge (bb);
!       gcc_assert (e->dest == EXIT_BLOCK_PTR
  		  && single_succ_p (bb) && (e->flags & EDGE_FALLTHRU));
  
        e->flags &= ~EDGE_FALLTHRU;
--- 1568,1574 ----
           to EXIT.  */
  
        e = single_succ_edge (bb);
!       gcc_assert (e->dest == cfun->cfg->exit_block_ptr
  		  && single_succ_p (bb) && (e->flags & EDGE_FALLTHRU));
  
        e->flags &= ~EDGE_FALLTHRU;
*************** commit_edge_insertions (void)
*** 1597,1603 ****
    verify_flow_info ();
  #endif
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 1597,1603 ----
    verify_flow_info ();
  #endif
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** commit_edge_insertions_watch_calls (void
*** 1642,1648 ****
    verify_flow_info ();
  #endif
  
!   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
      {
        edge e;
        edge_iterator ei;
--- 1642,1648 ----
    verify_flow_info ();
  #endif
  
!   FOR_BB_BETWEEN (bb, cfun->cfg->entry_block_ptr, cfun->cfg->exit_block_ptr, next_bb)
      {
        edge e;
        edge_iterator ei;
*************** rtl_verify_flow_info_1 (void)
*** 1906,1913 ****
  	      n_fallthru++, fallthru = e;
  	      if ((e->flags & EDGE_CROSSING)
  		  || (BB_PARTITION (e->src) != BB_PARTITION (e->dest)
! 		      && e->src != ENTRY_BLOCK_PTR
! 		      && e->dest != EXIT_BLOCK_PTR))
  	    { 
  		  error ("fallthru edge crosses section boundary (bb %i)",
  			 e->src->index);
--- 1906,1913 ----
  	      n_fallthru++, fallthru = e;
  	      if ((e->flags & EDGE_CROSSING)
  		  || (BB_PARTITION (e->src) != BB_PARTITION (e->dest)
! 		      && e->src != cfun->cfg->entry_block_ptr
! 		      && e->dest != cfun->cfg->exit_block_ptr))
  	    { 
  		  error ("fallthru edge crosses section boundary (bb %i)",
  			 e->src->index);
*************** rtl_verify_flow_info (void)
*** 2064,2070 ****
    rtx x;
    int num_bb_notes;
    const rtx rtx_first = get_insns ();
!   basic_block last_bb_seen = ENTRY_BLOCK_PTR, curr_bb = NULL;
  
    FOR_EACH_BB_REVERSE (bb)
      {
--- 2064,2070 ----
    rtx x;
    int num_bb_notes;
    const rtx rtx_first = get_insns ();
!   basic_block last_bb_seen = cfun->cfg->entry_block_ptr, curr_bb = NULL;
  
    FOR_EACH_BB_REVERSE (bb)
      {
*************** rtl_verify_flow_info (void)
*** 2096,2103 ****
  		  break;
  		}
  	}
!       else if (e->src != ENTRY_BLOCK_PTR
! 	       && e->dest != EXIT_BLOCK_PTR)
          {
  	  rtx insn;
  
--- 2096,2103 ----
  		  break;
  		}
  	}
!       else if (e->src != cfun->cfg->entry_block_ptr
! 	       && e->dest != cfun->cfg->exit_block_ptr)
          {
  	  rtx insn;
  
*************** rtl_verify_flow_info (void)
*** 2122,2128 ****
      }
  
    num_bb_notes = 0;
!   last_bb_seen = ENTRY_BLOCK_PTR;
  
    for (x = rtx_first; x; x = NEXT_INSN (x))
      {
--- 2122,2128 ----
      }
  
    num_bb_notes = 0;
!   last_bb_seen = cfun->cfg->entry_block_ptr;
  
    for (x = rtx_first; x; x = NEXT_INSN (x))
      {
*************** purge_dead_edges (basic_block bb)
*** 2278,2284 ****
  	      ei_next (&ei);
  	      continue;
  	    }
! 	  else if (e->dest != EXIT_BLOCK_PTR
  		   && BB_HEAD (e->dest) == JUMP_LABEL (insn))
  	    /* If the destination block is the target of the jump,
  	       keep the edge.  */
--- 2278,2284 ----
  	      ei_next (&ei);
  	      continue;
  	    }
! 	  else if (e->dest != cfun->cfg->exit_block_ptr
  		   && BB_HEAD (e->dest) == JUMP_LABEL (insn))
  	    /* If the destination block is the target of the jump,
  	       keep the edge.  */
*************** purge_dead_edges (basic_block bb)
*** 2286,2292 ****
  	      ei_next (&ei);
  	      continue;
  	    }
! 	  else if (e->dest == EXIT_BLOCK_PTR && returnjump_p (insn))
  	    /* If the destination block is the exit block, and this
  	       instruction is a return, then keep the edge.  */
  	    {
--- 2286,2292 ----
  	      ei_next (&ei);
  	      continue;
  	    }
! 	  else if (e->dest == cfun->cfg->exit_block_ptr && returnjump_p (insn))
  	    /* If the destination block is the exit block, and this
  	       instruction is a return, then keep the edge.  */
  	    {
*************** cfg_layout_redirect_edge_and_branch (edg
*** 2442,2455 ****
    if (e->dest == dest)
      return e;
  
!   if (e->src != ENTRY_BLOCK_PTR
        && (ret = try_redirect_by_replacing_jump (e, dest, true)))
      {
        src->flags |= BB_DIRTY;
        return ret;
      }
  
!   if (e->src == ENTRY_BLOCK_PTR
        && (e->flags & EDGE_FALLTHRU) && !(e->flags & EDGE_COMPLEX))
      {
        if (dump_file)
--- 2442,2455 ----
    if (e->dest == dest)
      return e;
  
!   if (e->src != cfun->cfg->entry_block_ptr
        && (ret = try_redirect_by_replacing_jump (e, dest, true)))
      {
        src->flags |= BB_DIRTY;
        return ret;
      }
  
!   if (e->src == cfun->cfg->entry_block_ptr
        && (e->flags & EDGE_FALLTHRU) && !(e->flags & EDGE_COMPLEX))
      {
        if (dump_file)
*************** cfg_layout_delete_block (basic_block bb)
*** 2576,2582 ****
  	    set_last_insn (insn);
  	}
      }
!   if (bb->next_bb != EXIT_BLOCK_PTR)
      to = &bb->next_bb->il.rtl->header;
    else
      to = &cfg_layout_function_footer;
--- 2576,2582 ----
  	    set_last_insn (insn);
  	}
      }
!   if (bb->next_bb != cfun->cfg->exit_block_ptr)
      to = &bb->next_bb->il.rtl->header;
    else
      to = &cfg_layout_function_footer;
*************** cfg_layout_can_merge_blocks_p (basic_blo
*** 2629,2635 ****
  	  && a != b
  	  /* Must be simple edge.  */
  	  && !(single_succ_edge (a)->flags & EDGE_COMPLEX)
! 	  && a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR
  	  /* If the jump insn has side effects,
  	     we can't kill the edge.  */
  	  && (!JUMP_P (BB_END (a))
--- 2629,2635 ----
  	  && a != b
  	  /* Must be simple edge.  */
  	  && !(single_succ_edge (a)->flags & EDGE_COMPLEX)
! 	  && a != cfun->cfg->entry_block_ptr && b != cfun->cfg->exit_block_ptr
  	  /* If the jump insn has side effects,
  	     we can't kill the edge.  */
  	  && (!JUMP_P (BB_END (a))
*************** static basic_block
*** 2733,2739 ****
  cfg_layout_split_edge (edge e)
  {
    basic_block new_bb =
!     create_basic_block (e->src != ENTRY_BLOCK_PTR
  			? NEXT_INSN (BB_END (e->src)) : get_insns (),
  			NULL_RTX, e->src);
  
--- 2733,2739 ----
  cfg_layout_split_edge (edge e)
  {
    basic_block new_bb =
!     create_basic_block (e->src != cfun->cfg->entry_block_ptr
  			? NEXT_INSN (BB_END (e->src)) : get_insns (),
  			NULL_RTX, e->src);
  
*************** rtl_flow_call_edges_add (sbitmap blocks)
*** 2830,2836 ****
    if (! blocks)
      check_last_block = true;
    else
!     check_last_block = TEST_BIT (blocks, EXIT_BLOCK_PTR->prev_bb->index);
  
    /* In the last basic block, before epilogue generation, there will be
       a fallthru edge to EXIT.  Special care is required if the last insn
--- 2830,2836 ----
    if (! blocks)
      check_last_block = true;
    else
!     check_last_block = TEST_BIT (blocks, cfun->cfg->exit_block_ptr->prev_bb->index);
  
    /* In the last basic block, before epilogue generation, there will be
       a fallthru edge to EXIT.  Special care is required if the last insn
*************** rtl_flow_call_edges_add (sbitmap blocks)
*** 2846,2852 ****
       Handle this by adding a dummy instruction in a new last basic block.  */
    if (check_last_block)
      {
!       basic_block bb = EXIT_BLOCK_PTR->prev_bb;
        rtx insn = BB_END (bb);
  
        /* Back up past insns that must be kept in the same block as a call.  */
--- 2846,2852 ----
       Handle this by adding a dummy instruction in a new last basic block.  */
    if (check_last_block)
      {
!       basic_block bb = cfun->cfg->exit_block_ptr->prev_bb;
        rtx insn = BB_END (bb);
  
        /* Back up past insns that must be kept in the same block as a call.  */
*************** rtl_flow_call_edges_add (sbitmap blocks)
*** 2858,2864 ****
  	{
  	  edge e;
  
! 	  e = find_edge (bb, EXIT_BLOCK_PTR);
  	  if (e)
  	    {
  	      insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
--- 2858,2864 ----
  	{
  	  edge e;
  
! 	  e = find_edge (bb, cfun->cfg->exit_block_ptr);
  	  if (e)
  	    {
  	      insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
*************** rtl_flow_call_edges_add (sbitmap blocks)
*** 2906,2912 ****
  #ifdef ENABLE_CHECKING
  	      if (split_at_insn == BB_END (bb))
  		{
! 		  e = find_edge (bb, EXIT_BLOCK_PTR);
  		  gcc_assert (e == NULL);
  		}
  #endif
--- 2906,2912 ----
  #ifdef ENABLE_CHECKING
  	      if (split_at_insn == BB_END (bb))
  		{
! 		  e = find_edge (bb, cfun->cfg->exit_block_ptr);
  		  gcc_assert (e == NULL);
  		}
  #endif
*************** rtl_flow_call_edges_add (sbitmap blocks)
*** 2920,2926 ****
  		    blocks_split++;
  		}
  
! 	      make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE);
  	    }
  
  	  if (insn == BB_HEAD (bb))
--- 2920,2926 ----
  		    blocks_split++;
  		}
  
! 	      make_edge (bb, cfun->cfg->exit_block_ptr, EDGE_FAKE);
  	    }
  
  	  if (insn == BB_HEAD (bb))


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