Fix purge_dead_edges wrt RESX

Jan Hubicka jh@suse.cz
Sun Mar 7 01:45:00 GMT 2004


Hi,
executing purge_dead_edges cause edges from RESX instructions to be elliminated.

Bootstrapped/regtested i686-pc-gnu-linux on tree-profilng-branch and mainline.
OK for mainline?
2004-03-07  Jan Hubicka  <jh@suse.cz>
	* cfgrtl.c (purge_dead_edges): Deal properly with RESX instructions.
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.57.2.28.2.2
diff -c -3 -p -r1.57.2.28.2.2 cfgrtl.c
*** cfgrtl.c	3 Mar 2004 14:17:36 -0000	1.57.2.28.2.2
--- cfgrtl.c	6 Mar 2004 00:35:37 -0000
*************** purge_dead_edges (basic_block bb)
*** 2158,2164 ****
        next = e->succ_next;
        if (e->flags & EDGE_EH)
  	{
! 	  if (can_throw_internal (BB_END (bb)))
  	    continue;
  	}
        else if (e->flags & EDGE_ABNORMAL_CALL)
--- 2158,2166 ----
        next = e->succ_next;
        if (e->flags & EDGE_EH)
  	{
! 	  if (can_throw_internal (BB_END (bb))
! 	      || (GET_CODE (BB_END (bb)) == JUMP_INSN
! 		  && GET_CODE (PATTERN (BB_END (bb))) == RESX))
  	    continue;
  	}
        else if (e->flags & EDGE_ABNORMAL_CALL)



More information about the Gcc-patches mailing list