On Wed, May 15, 2019 at 12:59:01PM -0500, Aaron Sawdey wrote:
> On 5/15/19 11:31 AM, Jakub Jelinek wrote:
> > On Wed, May 15, 2019 at 11:23:54AM -0500, Aaron Sawdey wrote:
> >> My goals for this are:
> >>  * memcpy() call becomes __builtin_memcpy and goes to optab[cpymem]
> >>  * memmove() call becomes __builtin_memmove (or __builtin_memcpy based
> >>    on the gimple analysis) and goes through optab[movmem] or optab[cpymem]
> > 
> > Except for the becomes part (the memcpy call is the same thing as
> > __builtin_memcpy in the middle-end, all you care about if it is
> > BUILT_IN_MEMCPY etc. and whether it has compatible arguments), and for the
> > missing optab[movmem] part and movmem->cpymem renaming, isn't that what we
> > have already?
> 
> Yes. I was just trying to state what I wanted it to become, some of which
> is already present. So I think I will start working on two patches:
> 
> 1) rename optab movmem and the underlying patterns to cpymem.
> 2) add a new optab movmem that is really memmove() and add support for
> having __builtin_memmove() use it.
> 
> Handling of the partial overlap case can be a separate piece of work.

That 1) and 2) can be also separate pieces of work ;).

        Jakub

Reply via email to