public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>, Andi Kleen <ak@linux.intel.com>,
	       Jonathan Wakely <jwakely.gcc@gmail.com>,
	gcc-patches@gcc.gnu.org,        libstdc++@gcc.gnu.org,
	rth@redhat.com
Subject: Re: [PATCH 1/4] Mark all member functions with memory models always inline
Date: Wed, 20 Mar 2013 10:46:00 -0000	[thread overview]
Message-ID: <20130320104613.GK12913@tucnak.redhat.com> (raw)
In-Reply-To: <CAFiYyc3Gfc_KMupTFdA9V3DEz8bXovKb_E7inG7CNwwgEw3MCg@mail.gmail.com>

On Wed, Mar 20, 2013 at 11:38:03AM +0100, Richard Biener wrote:
> Not without using information created by TER which is disabled for this
> case because of different line information.  If TER would not be disabled
> for this reason it would already work automagically.

Would relaxing that in TER for constants help in the case of:
static inline __attribute__((always_inline)) ...
foo (..., int m = __ATOMIC_SEQ_CST)
{
  if (something)
    bar ();
  else
    baz ();
  __atomic_test_and_set (&x, m);
}

void
test ()
{
  foo (..., __ATOMIC_HLE_ACQUIRE | __ATOMIC_SEQ_CST);
}
though?  I'd think as the temp = 0x10005; would be in a different bb, TER
wouldn't do anything here, for -O1 of course CCP or similar would propagate
that, but for -O0 we'd still have to walk the chain of SSA_NAMEs.

	Jakub

  reply	other threads:[~2013-03-20 10:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16 13:30 Andi Kleen
2013-03-16 13:29 ` [PATCH 4/4] Add warning for non-constant memory models Andi Kleen
2013-03-19 21:23   ` Richard Henderson
2013-03-16 13:29 ` [PATCH 2/4] Avoid non constant memory model uses in libatomic Andi Kleen
2013-03-19 21:23   ` Richard Henderson
2013-03-16 13:30 ` [PATCH 3/4] Avoid nonconst memmodels in libitm's local outdated copy of <atomic> too Andi Kleen
2013-03-19 21:23   ` Richard Henderson
     [not found] ` <CAH6eHdR=VhEfAes6S97CfBf0Newe1h3EeoxreRKKHpi4mpJh=w@mail.gmail.com>
     [not found]   ` <20130319064639.GA12913@tucnak.redhat.com>
2013-03-19 15:51     ` [PATCH 1/4] Mark all member functions with memory models always inline Andi Kleen
2013-03-19 16:10       ` Jakub Jelinek
2013-03-19 17:30         ` Andi Kleen
2013-03-20 10:38           ` Richard Biener
2013-03-20 10:46             ` Jakub Jelinek [this message]
2013-03-20 11:21               ` Richard Biener
2013-03-20 11:25                 ` Jakub Jelinek
2013-03-20 11:29                   ` Richard Biener

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=20130320104613.GK12913@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=libstdc++@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=rth@redhat.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).