This is the mail archive of the
mailing list for the GCC project.
Re: LRA Stuck in a loop until aborting
- From: Michael Matz <matz at suse dot de>
- To: Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- Cc: pshortis at dataworx dot com dot au, gcc at gcc dot gnu dot org
- Date: Thu, 17 Apr 2014 16:17:58 +0200 (CEST)
- Subject: Re: LRA Stuck in a loop until aborting
- Authentication-results: sourceware.org; auth=none
- References: <fc847518922f9baf6394b7982d05edce at dataworx dot com dot au> <534EFEB4 dot 40407 at dataworx dot com dot au> <534F01EB dot 30004 at redhat dot com> <534F43DA dot 8020700 at redhat dot com> <bbfcc64e17239e1fe902b76f3c9fb613 at dataworx dot com dot au> <878ur4w65y dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com>
On Thu, 17 Apr 2014, Richard Sandiford wrote:
> > "The constraints on a ʽmovmʼ must permit moving any hard register to
> > any other hard register provided..."
> > by providing a define_expand that assigns from a general_operand to a
> > nonimmediate_operand and ...
> > *ldsi instruction that can load from a general_operand to a
> > nonimmediate_operand
> > and a
> > *storesi instruction that can store a register_operand to a
> > memory_operand
> Must admit I can't find where this is documented from a quick look.
> Like Jeff and Richard, I could swear it was documented somewhere...
--------------- snip ------------------
This class of patterns is special in several ways. First of all,
each of these names up to and including full word size _must_ be
defined, because there is no other way to copy a datum from one
place to another. If there are patterns accepting operands in
larger modes, `movM' must be defined for integer modes of those
Second, these patterns are not used solely in the RTL generation
pass. Even the reload pass can generate move insns to copy values
from stack slots into temporary registers. When it does so, one
of the operands is a hard register and the other is an operand
that can need to be reloaded into a register.
Therefore, when given such a pair of operands, the pattern must
generate RTL which needs no reloading and needs no temporary
registers--no registers other than the operands. For example, if
you support the pattern with a `define_expand', then in such a
case the `define_expand' mustn't call `force_reg' or any other such
function which might generate new pseudo registers.
--------------- snap ------------------
So, what's actually documented is a bit more relaxed than "movM must be
able to move around Mmode operands of all forms". And it's restricted to
patterns named 'movM', while in reality all patterns that look like (and
would match) a move are so constrained.