This is the mail archive of the gcc@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]

Followup on cfg splitting problem and proposed patch


Does this look correct?

Fri Aug  1 19:12:27 2003  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* cfgrtl.c (rtl_split_block): Properly split block with
	abnormal edges.

*** cfgrtl.c	19 Jul 2003 14:47:00 -0000	1.96
--- cfgrtl.c	1 Aug 2003 23:05:52 -0000
*************** rtl_split_block (basic_block bb, void *i
*** 493,497 ****
    bb->succ = NULL;
    for (e = new_bb->succ; e; e = e->succ_next)
!     e->src = new_bb;
  
    new_edge = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
--- 493,518 ----
    bb->succ = NULL;
    for (e = new_bb->succ; e; e = e->succ_next)
!     {
!       /* Duplicate abnormal edge if needed, since both blocks can go
! 	 there.  But be careful about abnormal call edges.  */
!       if ((e->flags & EDGE_ABNORMAL) != 0
! 	  && flag_non_call_exceptions
! 	  && can_throw_internal (bb->end))
! 	unchecked_make_edge (bb, e->dest,
! 			     GET_CODE (bb->end) == CALL_INSN
! 			     ? e->flags | EDGE_ABNORMAL_CALL
! 			     : e->flags & (~EDGE_ABNORMAL_CALL));
! 
!       e->src = new_bb;
! 
!       if ((e->flags & EDGE_ABNORMAL_CALL) != 0
! 	  && GET_CODE (bb->end) == CALL_INSN
! 	  && GET_CODE (new_bb->end) != CALL_INSN)
! 	e->flags &= ~EDGE_ABNORMAL_CALL;
!       else if ((e->flags & EDGE_ABNORMAL_CALL) == 0
! 	  && GET_CODE (bb->end) != CALL_INSN
! 	  && GET_CODE (new_bb->end) == CALL_INSN)
! 	e->flags |= EDGE_ABNORMAL_CALL;
!     }
  
    new_edge = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);


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