This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reload shouldn't share in-operands with base of out-operands


On Feb 19, 2001, Bernd Schmidt <bernds@redhat.com> wrote:

> On 12 Feb 2001, Alexandre Oliva wrote:

>> This patch arranges for operand1 to not be shared in case it appears
>> as the base address of operand0, fixing the problem.

> I have to admit I don't entirely follow the logic in refers_to_base_addr_p.

It just checks whether the address of the output MEM is IN, (PLUS IN
whatever), (PLUS (PLUS IN whatever) whatever), ....

> Also, in find_reusable_reload, I'm not sure that having dont_share set
> will disable merging in all cases.

Well, if it works in the case of having the same register as the input
operand and used in the address of the output operand, I thought it
would work in case the input operand isn't just a register.  I confess
I haven't looked into the exact cases in which dont_share was used; it
just seemed exactly what I wanted to set.

Here's the deal: whenever we have an input operand that is used in the
address of the output operand, we can't share it with any other
reload, because it may be modified in this other reload before we have
a chance to use the address.  Before my patch, we'd only prevent
sharing in cases this input operand was a register.  I've extended it
to match PLUSes too.  That's all.

> (Please include patches in the main body of the message so they can be
> quoted)

Do you mean Pine won't handle inline text MIME sections as text?  :-(

I wonder how it tells the body of the message from other sections...
Maybe if I don't set the MIME type to text/x-patch, and use text/plain
instead...  I'll try that next time I send you a patch.  However,
IIRC, text/plain may not preserve white-space correctly, so it may
corrupt patch files in transit.  That's not the case of text/x-patch.

> +static int refers_to_base_addr_p (out, in)

> Small formatting problem.

Thanks, fixed.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]