This is the mail archive of the
mailing list for the GCC project.
Re: combination of read/write and earlyclobber constraint modifier
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 02 Jul 2014 10:04:47 -0400
- Subject: Re: combination of read/write and earlyclobber constraint modifier
- Authentication-results: sourceware.org; auth=none
- References: <53B30B96 dot 2000603 at mentor dot com>
On 2014-07-01, 3:27 PM, Tom de Vries wrote:
There are a few patterns which use both the read/write constraint
modifier (+) and the earlyclobber constraint modifier (&):
So my question is: is the combination of '&' and '+' supported ? If so,
what is the exact semantics ? If not, should we warn or give an error ?
1. yes, it is a valid combination for LRA.
2. With the point of view satisfying insn constraints, there is no
difference with =&, but as operand with +& is treated as input/output
and one with =& only as output, it might results in different reload
insns when the insn constraints are not satisfied. Although it is hard
for me to say exactly what the difference could be as it is too complicated.
Also using +& instead of &= might result in different reg costs and
different results in IRA (global RA) and even in register-pressure
sensitive insn scheduler, and in loop invariant motion.
3. So it is hard for me to say about usefulness of such construction
with LRA point of view or should we give a warn or an error. Probably
there is small usefulness of +& as it is very hard to describe what the
difference in comparison with '=&' will be for GCC developer or user.