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]

Re: GCC 3.3


> In light of this, please revert your original patch on the 3.3 branch,
> but proceed with fixing it on the mainline.  We can consider this
> optimization for 3.3.1 if it is stable by then.
I commit the attached patch.  Urlich does this solve the problems you
are seeing?

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.16114.2.493
diff -c -3 -p -r1.16114.2.493 ChangeLog
*** ChangeLog	29 Apr 2003 18:46:56 -0000	1.16114.2.493
--- ChangeLog	29 Apr 2003 19:07:42 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ Tue Apr 29 21:07:00 CEST 2003  Jan Hubicka  <jh@suse.cz>
+ 
+ 	* cse.c (count_reg_usage): Revert my previous patch.
+ 	
  2003-04-29  Zack Weinberg  <zack@codesourcery.com>
  
  	* config.gcc: Install obsolete target list for GCC 3.3.
Index: cse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cse.c,v
retrieving revision 1.244.2.1
diff -c -3 -p -r1.244.2.1 cse.c
*** cse.c	1 Apr 2003 19:17:10 -0000	1.244.2.1
--- cse.c	29 Apr 2003 19:07:43 -0000
*************** count_reg_usage (x, counts, dest, incr)
*** 7528,7535 ****
        /* Unless we are setting a REG, count everything in SET_DEST.  */
        if (GET_CODE (SET_DEST (x)) != REG)
  	count_reg_usage (SET_DEST (x), counts, NULL_RTX, incr);
        count_reg_usage (SET_SRC (x), counts,
! 		       SET_DEST (x),
  		       incr);
        return;
  
--- 7528,7542 ----
        /* Unless we are setting a REG, count everything in SET_DEST.  */
        if (GET_CODE (SET_DEST (x)) != REG)
  	count_reg_usage (SET_DEST (x), counts, NULL_RTX, incr);
+ 
+       /* If SRC has side-effects, then we can't delete this insn, so the
+ 	 usage of SET_DEST inside SRC counts.
+ 
+ 	 ??? Strictly-speaking, we might be preserving this insn
+ 	 because some other SET has side-effects, but that's hard
+ 	 to do and can't happen now.  */
        count_reg_usage (SET_SRC (x), counts,
! 		       side_effects_p (SET_SRC (x)) ? NULL_RTX : SET_DEST (x),
  		       incr);
        return;
  


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