This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for PR16967
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Roger Sayle <roger at eyesopen dot com>
- Date: Tue, 10 Aug 2004 18:29:41 +0200
- Subject: Patch for PR16967
- Organization: SUSE Labs
Hi,
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.
Gr.
Steven
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: