This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
branch patch for loop problems
- To: egcs-patches at egcs dot cygnus dot com
- Subject: branch patch for loop problems
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 10 Jun 1999 01:31:15 -0600
- Reply-To: law at cygnus dot com
Opps. Hit the wrong button.
Basically we've got a patch for 990513-1.c and some related problems, but
the patch is a little more complex than I'd like for the gcc-2.95 branch.
I've disabled the offending optimization in the branch only. I will iterate
with Joern to get the real fix into the mainline sources.
I'm *hoping* this will also fix some libstdc++ & libg++ regressions on the
sparc. I'll know more about them later.
* loop.c (strength_reduce): Disable biv->giv translations and
giv recombination. For the release branch only.
Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.156.4.5
diff -c -3 -p -r1.156.4.5 loop.c
*** loop.c 1999/06/09 22:39:44 1.156.4.5
--- loop.c 1999/06/10 06:42:51
*************** strength_reduce (scan_start, end, loop_t
*** 4134,4141 ****
n_extra_increment += bl->biv_count - 1;
/* If the loop contains volatile memory references do not allow any
! replacements to take place, since this could loose the volatile
markers. */
! if (n_extra_increment && ! loop_has_volatile)
{
int nregs = first_increment_giv + n_extra_increment;
--- 4134,4148 ----
n_extra_increment += bl->biv_count - 1;
/* If the loop contains volatile memory references do not allow any
! replacements to take place, since this could loose the volatile
! markers.
!
! Disabled for the gcc-2.95 release. There are still some problems with
! giv recombination. We have a patch from Joern which should fix those
! problems. But the patch is fairly complex and not really suitable for
! the gcc-2.95 branch at this stage. */
! if (0 && n_extra_increment && ! loop_has_volatile)
!
{
int nregs = first_increment_giv + n_extra_increment;
*************** strength_reduce (scan_start, end, loop_t
*** 4740,4746 ****
--- 4747,4759 ----
VARRAY_GROW (reg_iv_type, nregs);
VARRAY_GROW (reg_iv_info, nregs);
}
+ #if 0
+ /* Disabled for the gcc-2.95 release. There are still some problems
with
+ giv recombination. We have a patch from Joern which should fix those
+ problems. But the patch is fairly complex and not really suitable for
+ the gcc-2.95 branch at this stage. */
recombine_givs (bl, loop_start, loop_end, unroll_p);
+ #endif
/* Reduce each giv that we decided to reduce. */