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]

obvious combine fix


Hi,
I am going to install following patch as obvious once testing on i686
finishes.  It is required to make arm simulator backend working.
Basically we suceeds to eliminate jump in combine, but don't do cleanup_cfg.
The result is crash in calculate_dominance_info called from schedule_insns,
because dead loop is present.

It is not 100% clear to me, where the edge gets purged, but this patch
is I hope obviously correct.

With this patch I get newlib compiled, debugging crash in libstdc++.

Honza

Sun Jul 29 17:02:54 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* combine.c (try_combine): Discover noop jump as direct jump.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.221
diff -c -3 -p -r1.221 combine.c
*** combine.c	2001/07/24 21:39:19	1.221
--- combine.c	2001/07/29 15:01:16
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2763,2769 ****
         BARRIER following it since it may have initially been a
         conditional jump.  It may also be the last nonnote insn.  */
  
!     if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3))
        {
  	*new_direct_jump_p = 1;
  
--- 2763,2772 ----
         BARRIER following it since it may have initially been a
         conditional jump.  It may also be the last nonnote insn.  */
  
!     if (GET_CODE (newpat) == RETURN || any_uncondjump_p (i3)
! 	|| (GET_CODE (newpat) == SET
! 	    && SET_SRC (newpat) == pc_rtx
! 	    && SET_DEST (newpat) == pc_rtx))
        {
  	*new_direct_jump_p = 1;
  


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