This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] RFC: Never gimplify ASM_EXPRs


On Fri, 6 Jun 2003, Richard Henderson wrote:
> 
> The struct thing I always placed in a different class of workaround.
> You had a read from a "large" object in memory.  At least for some
> version of the compiler, this may have been interpreted as a read 
> from ALL memory, resulting in a memory write barrier that didn't
> affect cached reads.  I.e. possibly a bit better optimization-wise
> than the normal "memory" clobber.

That too. It's not a hugely common problem, but it does occur, and it
would be good to have a separate "read memory" clobber for those things
that want memory to be stable, but don't need the compiler to reload all
memory objects afterwards. Something like

	#define wmb() \
		asm("sfence": : :"readmem")

might be a good thing to have one day. But I don't worry too much about 
it.

		Linus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]