Do not replace GIVs containing volatile memory references

craig@jcb-sc.com craig@jcb-sc.com
Wed Mar 31 18:59:00 GMT 1999


>  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.
[...]
> 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.
[...]
>+ 
>+   /* 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)

Just a note: you are presumably aware your change will have no effect
whatsoever on the code as it *currently* stands, right?  The "0 &&"
at the beginning of the test assures that.

Not that this is therefore not a good change -- the "Temporary" and
"0 &&" strongly suggest the test might be re-enabled someday soon,
and if it needs to be a better test, so be it...

...just wanted to make sure you weren't expecting to see changes in
generated code as a result of this patch.

        tq vm, (burley)



More information about the Gcc-patches mailing list