This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH 1/4] Mark all member functions with memory models always inline
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, Andi Kleen <ak at linux dot intel dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, rth at redhat dot com
- Date: Wed, 20 Mar 2013 11:46:14 +0100
- Subject: Re: [PATCH 1/4] Mark all member functions with memory models always inline
- References: <1363440569-17331-1-git-send-email-andi at firstfloor dot org> <CAH6eHdR=VhEfAes6S97CfBf0Newe1h3EeoxreRKKHpi4mpJh=w at mail dot gmail dot com> <20130319064639 dot GA12913 at tucnak dot redhat dot com> <20130319155121 dot GM19692 at tassilo dot jf dot intel dot com> <20130319161022 dot GE12913 at tucnak dot redhat dot com> <20130319173016 dot GF20853 at two dot firstfloor dot org> <CAFiYyc3Gfc_KMupTFdA9V3DEz8bXovKb_E7inG7CNwwgEw3MCg at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot 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