Fix purge_dead_edges wrt RESX

Jan Hubicka jh@suse.cz
Sun Mar 7 10:12:00 GMT 2004


> On Sun, Mar 07, 2004 at 02:45:49AM +0100, Jan Hubicka wrote:
> > ! 	  if (can_throw_internal (BB_END (bb))
> > ! 	      || (GET_CODE (BB_END (bb)) == JUMP_INSN
> > ! 		  && GET_CODE (PATTERN (BB_END (bb))) == RESX))
> 
> I think it makes more sense to have can_throw_internal be true
> for RESX instructions.
OK, I somehow concluded that does not unwind_resume count as an
exception, but ineed it is.  I am testing the attached patch (it also
fixes testcase I have).  OK if it passes?

2004-03-07  Jan Hubicka  <jh@suse.cz>
	* except.c (can_throw_internal): Notice RESX instructions.
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.227.2.24.2.1
diff -c -3 -p -r1.227.2.24.2.1 except.c
*** except.c	3 Mar 2004 14:17:53 -0000	1.227.2.24.2.1
--- except.c	7 Mar 2004 10:07:31 -0000
*************** can_throw_internal (rtx insn)
*** 3111,3116 ****
--- 3118,3128 ----
  	}
        return false;
      }
+ 
+   if (GET_CODE (insn) == JUMP_INSN
+       && GET_CODE (PATTERN (insn)) == RESX
+       && XINT (PATTERN (insn), 0) > 0)
+     return can_throw_internal_1 (XINT (PATTERN (insn), 0));
  
    /* Every insn that might throw has an EH_REGION note.  */
    note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);



More information about the Gcc-patches mailing list