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]

[RFC] cfg.c: Remove cached_make_edge.


Hi,

Attached is a patch to remove cached_make_edge.

cached_make_edge takes an adjacency matrix of the CFG to quickly
determine if an edge that is requested for addition already exists.
In GCC, this matrix is called edge_cache, and was originaly meant to
speed up testcases with a lot of computed gotos.

http://gcc.gnu.org/ml/gcc/1999-10n/msg00078.html

However, retesting on computed-goto-intensive testcases like _num.i
(PR ????) and pi.i (from PR 2001) show that the edge cache does not
help these days.  This could be due to the fact that computed gotos
are factored.

The patch removes cached_make_edge and replaces all uses of it with
make_edge, which performs a check using find_edge.  Note that the
performance of find_edge is not too bad thanks to Jeff's work as long
as one end of an edge has a low degree.

Here is a timing in seconds on 5 runs of ./cc1 on _numi.i.

      original patched
real:  204.254 203.445 (0.397% down)
user:  199.371 199.208 (0.081% down)

Here is a timing in seconds on 5 runs of ./cc1 on pi.i.

      original patched
real:    5.563   4.717 (17.935% down)
user:    5.454   4.628 (17.847% down)

Here is a timing in seconds on 5 runs of ./cc1 on insn-attrtab.i.

      original patched
real:  192.644 190.258 (1.254% down)
user:  189.373 187.822 (0.825% down)

Here is a timing in seconds on a single run on cc1-i files.

      original patched
real:  232.116 231.826 (0.125% down)
user:  227.405 226.879 (0.231% down)

Having put all these benchmarks, I should not hide the fact that we
still have a lot of attempts to create duplicate edges.  Here is a
coverage test done on cc1-i files using GCC with this patch applied.

        -:  288:edge
        -:  289:make_edge (basic_block src, basic_block dest, int flags)
function make_edge called 2677949 returned 100% blocks executed 100%
  2677949:  290:{
  2677949:  291:  edge e = find_edge (src, dest);
        -:  292:
        -:  293:  /* Make sure we don't add duplicate edges.  */
  2677949:  294:  if (e)
        -:  295:    {
  1461894:  296:      e->flags |= flags;
  1461894:  297:      return NULL;
        -:  298:    }
        -:  299:
  1216055:  300:  return unchecked_make_edge (src, dest, flags);
        -:  301:}

Note that more than 50% of calls to make_edge are the duplicate case.
To see where these duplicate come from, I instrumented make_edge and
got the following numbers.

 802648 cfgbuild.c:196:make_label_edge trying to create a duplicate edge.
 620708 cfgbuild.c:383:make_edges trying to create a duplicate edge.
  15868 cfgbuild.c:244:make_edges trying to create a duplicate edge.
   7742 cfgbuild.c:379:make_edges trying to create a duplicate edge.
   6534 cfgbuild.c:321:make_edges trying to create a duplicate edge.
   4361 cfgbuild.c:336:make_edges trying to create a duplicate edge.
      1 tree-cfg.c:604:make_cond_expr_edges trying to create a duplicate edge.

The first column is the number of times the location at the second
column attempts to create a duplicate edge.  Note that most duplicates
come from the CFG builder at RTL level.  We cannot assume too much
about how expanders expand trees, so it may not be easy to figure out
how we can avoid redundant calls to make_edge.

Another approach, which I have not tried, is to improve the semantics
of edge_cache.

Currently, it's "one-sided" cache.  That is, if a bit in the bitmap is
set, that tells you that the corresponding edge definitely exists.
Otherwise, it does not tell you anything useful, in which case,
cached_make_edge resorts to find_edge.

My proposed not-yet-tried improvement would make it "double-sided"
cache.  That is, if a bit is set *if and only if* the corresponding
bit is set.  This would avoid all calls to find_edge while the edge
cache is available.  Of course, the down side is that we have to
initialize the adjacency matrix completely.

Any comment?

Kazu Hirata

2004-11-29  Kazu Hirata  <kazu@cs.umass.edu>

	* cfg.c (cached_make_edge): Remove.
	(make_edge): Call unchecked_make_edge instead.
	* basic-block.h: Remove the prototype for cached_make_edge.
	* cfgbuild.c (make_label_edge): Remove the first argument.
	Call make_edge instead of cached_make_edge
	(rtl_make_eh_edge): Likewise.
	(make_edges): Don't allocate edge_cache.  Remove the last
	argument.
	Call make_edge instead of cached_make_edge
	Adjust calls to rtl_make_eh_edge and make_label_edge.
	(find_basic_blocks): Adjust calls to make_edges.
	(find_many_sub_basic_blocks): Likewise.
	(find_sub_basic_blocks): Likewise.
	* except.c (finish_eh_generation): Adjust a call to
	rtl_make_eh_edge.

Index: basic-block.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/basic-block.h,v
retrieving revision 1.232
diff -c -d -p -r1.232 basic-block.h
*** basic-block.h	25 Nov 2004 10:31:38 -0000	1.232
--- basic-block.h	27 Nov 2004 16:02:39 -0000
*************** extern void remove_fake_exit_edges (void
*** 421,427 ****
  extern void add_noreturn_fake_exit_edges (void);
  extern void connect_infinite_loops_to_exit (void);
  extern edge unchecked_make_edge (basic_block, basic_block, int);
- extern edge cached_make_edge (sbitmap *, basic_block, basic_block, int);
  extern edge make_edge (basic_block, basic_block, int);
  extern edge make_single_succ_edge (basic_block, basic_block, int);
  extern void remove_edge (edge);
--- 421,426 ----
*************** extern bool purge_all_dead_edges (int);
*** 736,742 ****
  extern bool purge_dead_edges (basic_block);
  extern void find_sub_basic_blocks (basic_block);
  extern void find_many_sub_basic_blocks (sbitmap);
! extern void rtl_make_eh_edge (sbitmap *, basic_block, rtx);
  extern bool can_fallthru (basic_block, basic_block);
  extern bool could_fall_through (basic_block, basic_block);
  extern void flow_nodes_print (const char *, const sbitmap, FILE *);
--- 735,741 ----
  extern bool purge_dead_edges (basic_block);
  extern void find_sub_basic_blocks (basic_block);
  extern void find_many_sub_basic_blocks (sbitmap);
! extern void rtl_make_eh_edge (basic_block, rtx);
  extern bool can_fallthru (basic_block, basic_block);
  extern bool could_fall_through (basic_block, basic_block);
  extern void flow_nodes_print (const char *, const sbitmap, FILE *);
Index: cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
retrieving revision 1.78
diff -c -d -p -r1.78 cfg.c
*** cfg.c	22 Nov 2004 22:04:21 -0000	1.78
--- cfg.c	27 Nov 2004 16:02:39 -0000
*************** Software Foundation, 59 Temple Place - S
*** 31,37 ****
       - Low level basic block manipulation
  	 alloc_block, expunge_block
       - Edge manipulation
! 	 make_edge, make_single_succ_edge, cached_make_edge, remove_edge
  	 - Low level edge redirection (without updating instruction chain)
  	     redirect_edge_succ, redirect_edge_succ_nodup, redirect_edge_pred
       - Dumping and debugging
--- 31,37 ----
       - Low level basic block manipulation
  	 alloc_block, expunge_block
       - Edge manipulation
! 	 make_edge, make_single_succ_edge, remove_edge
  	 - Low level edge redirection (without updating instruction chain)
  	     redirect_edge_succ, redirect_edge_succ_nodup, redirect_edge_pred
       - Dumping and debugging
*************** unchecked_make_edge (basic_block src, ba
*** 282,339 ****
    return e;
  }
  
! /* Create an edge connecting SRC and DST with FLAGS optionally using
!    edge cache CACHE.  Return the new edge, NULL if already exist.  */
  
  edge
! cached_make_edge (sbitmap *edge_cache, basic_block src, basic_block dst, int flags)
  {
!   int use_edge_cache;
!   edge e;
! 
!   /* Don't bother with edge cache for ENTRY or EXIT, if there aren't that
!      many edges to them, or we didn't allocate memory for it.  */
!   use_edge_cache = (edge_cache
! 		    && src != ENTRY_BLOCK_PTR && dst != EXIT_BLOCK_PTR);
  
    /* Make sure we don't add duplicate edges.  */
!   switch (use_edge_cache)
      {
!     default:
!       /* Quick test for non-existence of the edge.  */
!       if (! TEST_BIT (edge_cache[src->index], dst->index))
! 	break;
! 
!       /* The edge exists; early exit if no work to do.  */
!       if (flags == 0)
! 	return NULL;
! 
!       /* Fall through.  */
!     case 0:
!       e = find_edge (src, dst);
!       if (e)
! 	{
! 	  e->flags |= flags;
! 	  return NULL;
! 	}
!       break;
      }
  
!   e = unchecked_make_edge (src, dst, flags);
! 
!   if (use_edge_cache)
!     SET_BIT (edge_cache[src->index], dst->index);
! 
!   return e;
! }
! 
! /* Create an edge connecting SRC and DEST with flags FLAGS.  Return newly
!    created edge or NULL if already exist.  */
! 
! edge
! make_edge (basic_block src, basic_block dest, int flags)
! {
!   return cached_make_edge (NULL, src, dest, flags);
  }
  
  /* Create an edge connecting SRC to DEST and set probability by knowing
--- 282,303 ----
    return e;
  }
  
! /* Create an edge connecting SRC and DEST with flags FLAGS.  Return newly
!    created edge or NULL if already exist.  */
  
  edge
! make_edge (basic_block src, basic_block dest, int flags)
  {
!   edge e = find_edge (src, dest);
  
    /* Make sure we don't add duplicate edges.  */
!   if (e)
      {
!       e->flags |= flags;
!       return NULL;
      }
  
!   return unchecked_make_edge (src, dest, flags);
  }
  
  /* Create an edge connecting SRC to DEST and set probability by knowing
Index: cfgbuild.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgbuild.c,v
retrieving revision 1.56
diff -c -d -p -r1.56 cfgbuild.c
*** cfgbuild.c	22 Nov 2004 17:13:59 -0000	1.56
--- cfgbuild.c	27 Nov 2004 16:02:40 -0000
*************** Software Foundation, 59 Temple Place - S
*** 50,57 ****
  
  static int count_basic_blocks (rtx);
  static void find_basic_blocks_1 (rtx);
! static void make_edges (basic_block, basic_block, int);
! static void make_label_edge (sbitmap *, basic_block, rtx, int);
  static void find_bb_boundaries (basic_block);
  static void compute_outgoing_frequencies (basic_block);
  
--- 50,57 ----
  
  static int count_basic_blocks (rtx);
  static void find_basic_blocks_1 (rtx);
! static void make_edges (basic_block, basic_block);
! static void make_label_edge (basic_block, rtx, int);
  static void find_bb_boundaries (basic_block);
  static void compute_outgoing_frequencies (basic_block);
  
*************** count_basic_blocks (rtx f)
*** 181,187 ****
  /* Create an edge from a basic block to a label.  */
  
  static void
! make_label_edge (sbitmap *edge_cache, basic_block src, rtx label, int flags)
  {
    gcc_assert (LABEL_P (label));
  
--- 181,187 ----
  /* Create an edge from a basic block to a label.  */
  
  static void
! make_label_edge (basic_block src, rtx label, int flags)
  {
    gcc_assert (LABEL_P (label));
  
*************** make_label_edge (sbitmap *edge_cache, ba
*** 193,205 ****
    if (INSN_UID (label) == 0)
      return;
  
!   cached_make_edge (edge_cache, src, BLOCK_FOR_INSN (label), flags);
  }
  
  /* Create the edges generated by INSN in REGION.  */
  
  void
! rtl_make_eh_edge (sbitmap *edge_cache, basic_block src, rtx insn)
  {
    int is_call = CALL_P (insn) ? EDGE_ABNORMAL_CALL : 0;
    rtx handlers, i;
--- 193,205 ----
    if (INSN_UID (label) == 0)
      return;
  
!   make_edge (src, BLOCK_FOR_INSN (label), flags);
  }
  
  /* Create the edges generated by INSN in REGION.  */
  
  void
! rtl_make_eh_edge (basic_block src, rtx insn)
  {
    int is_call = CALL_P (insn) ? EDGE_ABNORMAL_CALL : 0;
    rtx handlers, i;
*************** rtl_make_eh_edge (sbitmap *edge_cache, b
*** 207,213 ****
    handlers = reachable_handlers (insn);
  
    for (i = handlers; i; i = XEXP (i, 1))
!     make_label_edge (edge_cache, src, XEXP (i, 0),
  		     EDGE_ABNORMAL | EDGE_EH | is_call);
  
    free_INSN_LIST_list (&handlers);
--- 207,213 ----
    handlers = reachable_handlers (insn);
  
    for (i = handlers; i; i = XEXP (i, 1))
!     make_label_edge (src, XEXP (i, 0),
  		     EDGE_ABNORMAL | EDGE_EH | is_call);
  
    free_INSN_LIST_list (&handlers);
*************** rtl_make_eh_edge (sbitmap *edge_cache, b
*** 222,231 ****
     the list of exception regions active at the end of the basic block.  */
  
  static void
! make_edges (basic_block min, basic_block max, int update_p)
  {
    basic_block bb;
-   sbitmap *edge_cache = NULL;
  
    /* Assume no computed jump; revise as we create edges.  */
    current_function_has_computed_jump = 0;
--- 222,230 ----
     the list of exception regions active at the end of the basic block.  */
  
  static void
! make_edges (basic_block min, basic_block max)
  {
    basic_block bb;
  
    /* Assume no computed jump; revise as we create edges.  */
    current_function_has_computed_jump = 0;
*************** make_edges (basic_block min, basic_block
*** 239,269 ****
    if (flag_reorder_blocks_and_partition)
      current_function_has_computed_jump = 1;
  
-   /* Heavy use of computed goto in machine-generated code can lead to
-      nearly fully-connected CFGs.  In that case we spend a significant
-      amount of time searching the edge lists for duplicates.  */
-   if (forced_labels || cfun->max_jumptable_ents > 100)
-     {
-       edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block);
-       sbitmap_vector_zero (edge_cache, last_basic_block);
- 
-       if (update_p)
-         FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
- 	  {
- 	    edge e;
- 	    edge_iterator ei;
- 
- 	    FOR_EACH_EDGE (e, ei, bb->succs)
- 	      if (e->dest != EXIT_BLOCK_PTR)
- 		SET_BIT (edge_cache[bb->index], e->dest->index);
- 	  }
-     }
- 
    /* 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)
!     cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, min,
! 		      EDGE_FALLTHRU);
  
    FOR_BB_BETWEEN (bb, min, max->next_bb, next_bb)
      {
--- 238,247 ----
    if (flag_reorder_blocks_and_partition)
      current_function_has_computed_jump = 1;
  
    /* 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)
      {
*************** make_edges (basic_block min, basic_block
*** 274,280 ****
  
        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.  */
--- 252,258 ----
  
        if (LABEL_P (BB_HEAD (bb))
  	  && LABEL_ALT_ENTRY_P (BB_HEAD (bb)))
! 	make_edge (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
*** 289,295 ****
  
  	  /* Recognize exception handling placeholders.  */
  	  if (GET_CODE (PATTERN (insn)) == RESX)
! 	    rtl_make_eh_edge (edge_cache, bb, insn);
  
  	  /* Recognize a non-local goto as a branch outside the
  	     current function.  */
--- 267,273 ----
  
  	  /* Recognize exception handling placeholders.  */
  	  if (GET_CODE (PATTERN (insn)) == RESX)
! 	    rtl_make_eh_edge (bb, insn);
  
  	  /* Recognize a non-local goto as a branch outside the
  	     current function.  */
*************** make_edges (basic_block min, basic_block
*** 308,314 ****
  		vec = XVEC (PATTERN (tmp), 1);
  
  	      for (j = GET_NUM_ELEM (vec) - 1; j >= 0; --j)
! 		make_label_edge (edge_cache, bb,
  				 XEXP (RTVEC_ELT (vec, j), 0), 0);
  
  	      /* Some targets (eg, ARM) emit a conditional jump that also
--- 286,292 ----
  		vec = XVEC (PATTERN (tmp), 1);
  
  	      for (j = GET_NUM_ELEM (vec) - 1; j >= 0; --j)
! 		make_label_edge (bb,
  				 XEXP (RTVEC_ELT (vec, j), 0), 0);
  
  	      /* Some targets (eg, ARM) emit a conditional jump that also
*************** make_edges (basic_block min, basic_block
*** 318,324 ****
  		  && SET_DEST (tmp) == pc_rtx
  		  && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
  		  && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
! 		make_label_edge (edge_cache, bb,
  				 XEXP (XEXP (SET_SRC (tmp), 2), 0), 0);
  
  #ifdef CASE_DROPS_THROUGH
--- 296,302 ----
  		  && SET_DEST (tmp) == pc_rtx
  		  && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
  		  && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF)
! 		make_label_edge (bb,
  				 XEXP (XEXP (SET_SRC (tmp), 2), 0), 0);
  
  #ifdef CASE_DROPS_THROUGH
*************** make_edges (basic_block min, basic_block
*** 335,352 ****
  	      current_function_has_computed_jump = 1;
  
  	      for (x = forced_labels; x; x = XEXP (x, 1))
! 		make_label_edge (edge_cache, bb, XEXP (x, 0), EDGE_ABNORMAL);
  	    }
  
  	  /* 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
  	    {
  	      gcc_assert (JUMP_LABEL (insn));
! 	      make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);
  	    }
  	}
  
--- 313,330 ----
  	      current_function_has_computed_jump = 1;
  
  	      for (x = forced_labels; x; x = XEXP (x, 1))
! 		make_label_edge (bb, XEXP (x, 0), EDGE_ABNORMAL);
  	    }
  
  	  /* Returns create an exit out.  */
  	  else if (returnjump_p (insn))
! 	    make_edge (bb, EXIT_BLOCK_PTR, 0);
  
  	  /* Otherwise, we have a plain conditional or unconditional jump.  */
  	  else
  	    {
  	      gcc_assert (JUMP_LABEL (insn));
! 	      make_label_edge (bb, JUMP_LABEL (insn), 0);
  	    }
  	}
  
*************** make_edges (basic_block min, basic_block
*** 355,362 ****
  	 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
  	 handler for this CALL_INSN.  If we're handling non-call
--- 333,339 ----
  	 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))
! 	make_edge (bb, EXIT_BLOCK_PTR, EDGE_SIBCALL | EDGE_ABNORMAL);
  
        /* If this is a CALL_INSN, then mark it as reaching the active EH
  	 handler for this CALL_INSN.  If we're handling non-call
*************** make_edges (basic_block min, basic_block
*** 365,371 ****
        else if (code == CALL_INSN || flag_non_call_exceptions)
  	{
  	  /* Add any appropriate EH edges.  */
! 	  rtl_make_eh_edge (edge_cache, bb, insn);
  
  	  if (code == CALL_INSN && nonlocal_goto_handler_labels)
  	    {
--- 342,348 ----
        else if (code == CALL_INSN || flag_non_call_exceptions)
  	{
  	  /* Add any appropriate EH edges.  */
! 	  rtl_make_eh_edge (bb, insn);
  
  	  if (code == CALL_INSN && nonlocal_goto_handler_labels)
  	    {
*************** make_edges (basic_block min, basic_block
*** 382,388 ****
  
  	      if (!note || INTVAL (XEXP (note, 0)) >=  0)
  		for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
! 		  make_label_edge (edge_cache, bb, XEXP (x, 0),
  				   EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
  	    }
  	}
--- 359,365 ----
  
  	      if (!note || INTVAL (XEXP (note, 0)) >=  0)
  		for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
! 		  make_label_edge (bb, XEXP (x, 0),
  				   EDGE_ABNORMAL | EDGE_ABNORMAL_CALL);
  	    }
  	}
*************** make_edges (basic_block min, basic_block
*** 399,414 ****
  	insn = NEXT_INSN (insn);
  
        if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru))
! 	cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
        else if (bb->next_bb != EXIT_BLOCK_PTR)
  	{
  	  if (force_fallthru || insn == BB_HEAD (bb->next_bb))
! 	    cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
  	}
      }
- 
-   if (edge_cache)
-     sbitmap_vector_free (edge_cache);
  }
  
  /* Find all basic blocks of the function whose first insn is F.
--- 376,388 ----
  	insn = NEXT_INSN (insn);
  
        if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru))
! 	make_edge (bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
        else if (bb->next_bb != EXIT_BLOCK_PTR)
  	{
  	  if (force_fallthru || insn == BB_HEAD (bb->next_bb))
! 	    make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
  	}
      }
  }
  
  /* Find all basic blocks of the function whose first insn is F.
*************** find_basic_blocks (rtx f, int nregs ATTR
*** 548,554 ****
    profile_status = PROFILE_ABSENT;
  
    /* 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.  */
--- 522,528 ----
    profile_status = PROFILE_ABSENT;
  
    /* Discover the edges of our cfg.  */
!   make_edges (ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb);
  
    /* 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_many_sub_basic_blocks (sbitmap bloc
*** 701,707 ****
  
    /* Now re-scan and wire in all edges.  This expect simple (conditional)
       jumps at the end of each new basic blocks.  */
!   make_edges (min, max, 1);
  
    /* Update branch probabilities.  Expect only (un)conditional jumps
       to be created with only the forward edges.  */
--- 675,681 ----
  
    /* Now re-scan and wire in all edges.  This expect simple (conditional)
       jumps at the end of each new basic blocks.  */
!   make_edges (min, max);
  
    /* Update branch probabilities.  Expect only (un)conditional jumps
       to be created with only the forward edges.  */
*************** find_sub_basic_blocks (basic_block bb)
*** 745,751 ****
  
    /* Now re-scan and wire in all edges.  This expect simple (conditional)
       jumps at the end of each new basic blocks.  */
!   make_edges (min, max, 1);
  
    /* Update branch probabilities.  Expect only (un)conditional jumps
       to be created with only the forward edges.  */
--- 719,725 ----
  
    /* Now re-scan and wire in all edges.  This expect simple (conditional)
       jumps at the end of each new basic blocks.  */
!   make_edges (min, max);
  
    /* Update branch probabilities.  Expect only (un)conditional jumps
       to be created with only the forward edges.  */
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.296
diff -c -d -p -r1.296 except.c
*** except.c	24 Nov 2004 14:35:28 -0000	1.296
--- except.c	27 Nov 2004 16:02:44 -0000
*************** finish_eh_generation (void)
*** 1859,1865 ****
  	    ei_next (&ei);
  	}
        if (eh)
! 	rtl_make_eh_edge (NULL, bb, BB_END (bb));
      }
  }
  
--- 1859,1865 ----
  	    ei_next (&ei);
  	}
        if (eh)
! 	rtl_make_eh_edge (bb, BB_END (bb));
      }
  }
  


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