This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCSE considers read only memory clobbered by function calls.
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Mostafa Hagog <MUSTAFA at il dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 May 2005 10:38:53 +0200
- Subject: Re: GCSE considers read only memory clobbered by function calls.
- References: <OFFB31EC0B.84E37FDC-ON43256FFD.002AE5FF-43256FFD.002B2D3F@il.ibm.com>
My wild guess is that this was not possible when MEM_READONLY_P was
RTX_UNCHANGING_P, and now it is.
What wasn't possible? the fact that GCSE considers MEM_READONLY_P call
clobbered or the fact that CSE does not consider it such that?
I think that it was not so easy as with your patch when RTX_UNCHANGING_P
meant that a location was "write once". Indeed, CSE had some tricks in
the paths that handled RTX_UNCHANGING_P. The patch that killed that flag
(replacing it with MEM_READONLY_P) did some simplification of the code
that handled it:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cse.c.diff?r1=1.307&r2=1.308
RTX_UNCHANGING_P was never mentioned in gcse.c so probably it was not
easy at all to teach gcse.c about it.
(This was not a remark on your patch, but only a half-hearted attempt at
archaeology).
Paolo