Patch for PR16967

Steven Bosscher
Tue Aug 10 16:47:00 GMT 2004


Roger suggested I should try to see how effective it is after the
tree-ssa merge to have multiple GCSE passes.  So I tried that and
found out that for most files, we never stop before the maximum
number of passes is reached.

Apparently we don't want to GCSE a SYMBOL_REF because we already
treat them as constants for constant propagation.


	PR rtl-optimization/16967
	* gcse.c (want_to_gcse_p): Don't want to GCSE a plain SYMBOL_REF.

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 16:24:33 -0000
*************** want_to_gcse_p (rtx x)
*** 1214,1219 ****
--- 1214,1220 ----
      case REG:
      case SUBREG:
+     case SYMBOL_REF:
      case CONST_INT:
      case CONST_DOUBLE:
      case CONST_VECTOR:

More information about the Gcc-patches mailing list