This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: "+m" constraints bogus?
Hi,
On Tue, 24 Jul 2007, Jan Hubicka wrote:
> >
> > It says that because of the problems you described in reload. Are you
> > sure those were ever fixed?
>
> Well, something is definitly weird. I can find patch:
> http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01806.html
> that added a waring. In 3.4 the warning was taken back by rth:
> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00438.html
> with some disucssion that lead to nowhere.
>
> I will try to find the original Jason's problem, does anyone recall?
here:
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01358.html
It describes the potential problem again, and I know of no changes in
reload which would have magically handled matching mem-only constraints.
I believe the problem currently only doesn't exist because the
gimplification mentioned by Andrew doesn't let +m come through to RTL. So
it would probably be best to ensure that it stays that way, and maybe add
an assert instead of the warning, that we don't see matching or inout
constraints which don't allow registers.
For reference, the potential problem in reload is the following: matching
constraints might result in invalid operands (address not using the same
pseudo in our case, for instance) for which reloads are pushed. Such
pushed reloads can only be satisfied by a register in an appropriate class
(the reload reg). If the alternative doesn't allow any registers such
reload can _never_ be satisfied --> boom. That's the old problem of
reload that it can't reload by using memory.
Ciao,
Michael.