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]
Other format: [Raw text]

Re: Patch for PR16967


On Tuesday 10 August 2004 21:09, Roger Sayle wrote:
> On Tue, 10 Aug 2004, Steven Bosscher wrote:
> > 	PR rtl-optimization/16967
> > 	* gcse.c (want_to_gcse_p): Don't want to GCSE a plain SYMBOL_REF.
>
> This is Ok for mainline.

It appears that we need this not only for SYMBOL_REF but
also for CONST:

Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.309
diff -c -3 -p -r1.309 gcse.c
*** gcse.c      9 Aug 2004 16:58:42 -0000       1.309
--- gcse.c      10 Aug 2004 19:55:38 -0000
*************** want_to_gcse_p (rtx x)
*** 1214,1219 ****
--- 1214,1221 ----
      {
      case REG:
      case SUBREG:
+     case SYMBOL_REF:
+     case CONST:
      case CONST_INT:
      case CONST_DOUBLE:
      case CONST_VECTOR:

I have no idea what the effect of this is on either compil
time or quality of the generated code.  I suggest I look
into this a bit more and see what the effect of the patch
is (or if someone can make an educated guess, be my guest ;-)

Gr.
Steven



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