From: Jeff Law <law@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
Richard Biener <rguenther@suse.de>,
Eric Botcazou <ebotcazou@adacore.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Reenable CSE of non-volatile inline asm (PR rtl-optimization/63637)
Date: Thu, 15 Jan 2015 18:22:00 -0000 [thread overview]
Message-ID: <54B800C4.2030800@redhat.com> (raw)
In-Reply-To: <20150115081330.GB1405@tucnak.redhat.com>
On 01/15/15 01:13, Jakub Jelinek wrote:
>
> The glibc barriers are supposedly something that can be CSEd (one barrier instead of
> two consecutive barriers is enough), but certainly not moved across any loads/stores
> in between. In the kernel case, the enable/disable probably wouldn't allow even CSE.
>
> So I'm with Jeff that we should treat "memory" at least as unspecified read and write,
> and whether we can CSE them if there are no memory loads/stores in between them can
> be discussed (most likely the kernel would be safe even in that case, because those
> usually don't nest and appear in pairs, or act as barriers (like the glibc case),
> or read from segment registers (guess again ok to be CSEd with no intervening loads/stores).
>
> In 4.9 backport I'd prefer not to CSE them at all though, stay conservative.
My vote would be to go conservative. For gcc6 consider allowing a
"memory" tag in the inputs and outputs to specify a read of any memory
location and write of any memory location respectively. A "memory" tag
in the clobbers would maintain the conservative behaviour.
jeff
next prev parent reply other threads:[~2015-01-15 18:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 16:22 Jakub Jelinek
2015-01-13 17:06 ` Segher Boessenkool
2015-01-13 20:02 ` Jeff Law
2015-01-13 20:29 ` Jakub Jelinek
2015-01-13 22:28 ` Jeff Law
2015-01-14 3:44 ` Segher Boessenkool
2015-01-14 6:52 ` Jeff Law
2015-01-14 15:40 ` Segher Boessenkool
2015-01-15 6:46 ` Jeff Law
2015-01-15 7:54 ` Richard Biener
2015-01-15 8:40 ` Jakub Jelinek
2015-01-15 8:43 ` Richard Biener
2015-01-15 9:50 ` Jakub Jelinek
2015-01-15 18:22 ` Jeff Law [this message]
2015-01-23 21:39 ` Richard Henderson
2015-01-23 22:53 ` Segher Boessenkool
2015-01-23 23:12 ` Jakub Jelinek
2015-01-24 7:23 ` Segher Boessenkool
2015-01-24 14:39 ` Richard Sandiford
2015-01-13 22:42 ` Segher Boessenkool
2015-01-14 0:40 ` Segher Boessenkool
2015-01-14 7:12 ` Jeff Law
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=54B800C4.2030800@redhat.com \
--to=law@redhat.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=rguenther@suse.de \
--cc=richard.guenther@gmail.com \
--cc=segher@kernel.crashing.org \
/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).