From: Jakub Jelinek <jakub@redhat.com>
To: Aaron Sawdey <acsawdey@linux.ibm.com>
Cc: Michael Matz <matz@suse.de>,
Richard Biener <richard.guenther@gmail.com>,
GCC Development <gcc@gcc.gnu.org>,
Joseph Myers <joseph@codesourcery.com>,
Jeff Law <law@redhat.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.ibm.com>
Subject: Re: Fixing inline expansion of overlapping memmove and non-overlapping memcpy
Date: Wed, 15 May 2019 16:31:00 -0000 [thread overview]
Message-ID: <20190515163129.GL19695@tucnak> (raw)
In-Reply-To: <e82635e9-ff73-c638-5753-b9891dfaef5c@linux.ibm.com>
On Wed, May 15, 2019 at 11:23:54AM -0500, Aaron Sawdey wrote:
> We currently have gimple_fold_builtin_memory_op() figuring out where there
> is no overlap and converging __builtin_memmove() to __builtin_memcpy(). Would
> you forsee looking for converting __builtin_memmove() with overlap into
> a call to __builtin_memmove_hint if it is a case where we can define the
Please do not introduce user visible builtins that you are not intending to
support for user use. Thus, I think you want internal function
.MEMMOVE_HINT as opposed to __builtin_memmove_hint.
> overlap precisely enough to provide the hint? My guess is that this wouldn't
> be a very common case.
>
> 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?
Jakub
next prev parent reply other threads:[~2019-05-15 16:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 19:21 Aaron Sawdey
2019-05-15 12:23 ` Richard Biener
2019-05-15 13:24 ` Aaron Sawdey
2019-05-15 14:02 ` Michael Matz
2019-05-15 14:11 ` Jakub Jelinek
2019-05-15 14:47 ` Michael Matz
2019-05-15 16:24 ` Aaron Sawdey
2019-05-15 16:31 ` Jakub Jelinek [this message]
2019-05-15 17:59 ` Aaron Sawdey
2019-05-15 18:01 ` Jakub Jelinek
2019-05-15 18:03 ` Aaron Sawdey
2019-05-15 13:10 ` Michael Matz
2019-05-15 13:16 ` Aaron Sawdey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190515163129.GL19695@tucnak \
--to=jakub@redhat.com \
--cc=acsawdey@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=law@redhat.com \
--cc=matz@suse.de \
--cc=richard.guenther@gmail.com \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).