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]

Experiment with gen_rtx_combine


As a preliminary step towards the combine.c change I mentioned, I modified
gen_rtx_combine so it does the same thing as gen_rtx.  I don't completely
remember why I originally wrote it to do as it does, but think there
was a reason that is no longer valid. But I want to be sure.

I tested this with a bootstrap and "make check" on Alphaev56 and a bootstrap
of just C on x86, but I want to make sure there aren't any problems on
other machines before making changes that depend on this new behavior.

I also found a bug in a previous change in combine.c as part of this testing
and fixed it in the first hunk below.  That bug caused a bootstrap
(including Ada) to fail on Alpha.

Sun Mar 11 17:01:41 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* combine.c (try_combine): Fix error in change to try original
	register.
	(gen_rtx_combine): Do same as gen_rtx for now.

*** combine.c	2001/03/07 19:29:35	1.189
--- combine.c	2001/03/11 21:44:37
*************** try_combine (i3, i2, i1, new_direct_jump
*** 2151,2160 ****
  	     the original register.  */
  	  if (! m_split && ni2dest != i2dest)
! 	    m_split = split_insns (gen_rtx_PARALLEL
! 				   (VOIDmode,
! 				    gen_rtvec (2, newpat,
! 					       gen_rtx_CLOBBER (VOIDmode,
! 								i2dest))),
! 				    i3);
  	}
  
--- 2151,2163 ----
  	     the original register.  */
  	  if (! m_split && ni2dest != i2dest)
! 	    {
! 	      ni2dest = i2dest;
! 	      m_split = split_insns (gen_rtx_PARALLEL
! 				     (VOIDmode,
! 				      gen_rtvec (2, newpat,
! 						 gen_rtx_CLOBBER (VOIDmode,
! 								  i2dest))),
! 				     i3);
! 	    }
  	}
  
*************** gen_rtx_combine VPARAMS ((enum rtx_code 
*** 9922,9941 ****
  
    va_end (p);
- 
-   /* See if this is in undobuf.  Be sure we don't use objects that came
-      from another insn; this could produce circular rtl structures.  */
- 
-   for (undo = undobuf.undos; undo != undobuf.previous_undos; undo = undo->next)
-     if (!undo->is_int
- 	&& GET_CODE (undo->old_contents.r) == code
- 	&& GET_MODE (undo->old_contents.r) == mode)
-       {
- 	for (j = 0; j < n_args; j++)
- 	  if (XEXP (undo->old_contents.r, j) != args[j])
- 	    break;
- 
- 	if (j == n_args)
- 	  return undo->old_contents.r;
-       }
  
    /* Otherwise make a new rtx.  We know we have 1, 2, or 3 args.
--- 9925,9928 ----


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