Do not replace GIVs containing volatile memory references
Nick Clifton
nickc@cygnus.com
Thu Mar 18 16:03:00 GMT 1999
Hi Guys,
I have now checked in the following patch. It prevents loops which
contain volatile memory references from having any GIV replacements
applied, since this will loose the volatile flag on those insns.
Cheers
Nick
Thu Mar 18 15:58:26 1999 Nick Clifton <nickc@cygnus.com>
* loop.c (strength_reduce): Do not perform pseudo replacements
if the loop contains volatile memory references.
Index: gcc/loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.148
diff -p -w -r1.148 loop.c
*** loop.c 1999/03/11 13:28:55 1.148
--- loop.c 1999/03/18 23:59:22
*************** strength_reduce (scan_start, end, loop_t
*** 4115,4122 ****
first_increment_giv = max_reg_num ();
for (n_extra_increment = 0, bl = loop_iv_list; bl; bl = bl->next)
n_extra_increment += bl->biv_count - 1;
/* XXX Temporary. */
! if (0 && n_extra_increment)
{
int nregs = first_increment_giv + n_extra_increment;
--- 4115,4125 ----
first_increment_giv = max_reg_num ();
for (n_extra_increment = 0, bl = loop_iv_list; bl; bl = bl->next)
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. */
/* XXX Temporary. */
! if (0 && n_extra_increment && ! loop_has_volatile)
{
int nregs = first_increment_giv + n_extra_increment;
More information about the Gcc-patches
mailing list