This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fno-tree-cselim not working?
- From: skaller <skaller at users dot sourceforge dot net>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, gcc at gcc dot gnu dot org
- Date: Sat, 27 Oct 2007 09:33:55 +1000
- Subject: Re: -fno-tree-cselim not working?
- References: <20071026070903.GS2896@sunsite.mff.cuni.cz.suse.lists.egcs> <20071026.002701.193707917.davem@davemloft.net.suse.lists.egcs> <20071026074825.GT2896@sunsite.mff.cuni.cz.suse.lists.egcs> <20071026.005802.107688735.davem@davemloft.net.suse.lists.egcs> <m3bqamj5x7.fsf@localhost.localdomain.suse.lists.egcs> <p73k5p9prwx.fsf@bingen.suse.de> <m38x5pfwwc.fsf@localhost.localdomain>
On Fri, 2007-10-26 at 13:23 -0700, Ian Lance Taylor wrote:
> Andi Kleen <andi@firstfloor.org> writes:
>
> > Ian Lance Taylor <iant@google.com> writes:
> > >
> > > This code isn't going to be a problem, because spin_unlock presumably
> > > includes a memory barrier.
> >
> > At least in the Linux kernel and also in glibc for mutexes locks are just plain
> > function calls, which are not necessarily full memory barriers.
>
> True, and problematic in some cases--but a function call which gcc
> can't see is a memory barrier for all addressable memory.
I would have thought it is the case iff the register aliasing
the variable is caller save rather than callee save according
to the ABI.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net