On 05/02/2012 11:10 AM, Richard Guenther wrote:
On Sat, Apr 28, 2012 at 5:31 PM, Bernd Schmidt<ber...@codesourcery.com>  wrote:
This patch allows us to recognize that even if the argument to memcpy lives
across the call, we can allocate it to a call-used register by reusing the
return value of the function.

Heh, interesting idea.  I suppose you chose memcpy/memmove because the
middle-end emits those for block moves?

Customer request actually. It just occurred to me that I could add strcpy as well.

I see you've gone all the way
generalizing support for this instead of a special hack (an RTL flag on the
call, directly set by the expander?) for this case?

The RTL flag wouldn't allow us to say which argument register is returned. I think the SET representation works reasonably well.

I've chickened out at adding fnspec annotations to builtins because of the
explosion of various strings that would need ;)

That said, I like it but will leave the RTL / IRA parts to someone else to look
at.

Ok, will wait for that.


Bernd

Reply via email to