[LLVMdev] A question w.r.t fence instruction vs. noalias pointer

Guo, Xiaoyi Xiaoyi.Guo at amd.com
Thu Jun 13 11:56:14 PDT 2013


Thanks. That clarifies the question I have w.r.t. noalias pointers.

Xiaoyi

From: Eli Friedman [mailto:eli.friedman at gmail.com]
Sent: Thursday, June 13, 2013 11:53 AM
To: Guo, Xiaoyi
Cc: LLVM Dev
Subject: Re: [LLVMdev] A question w.r.t fence instruction vs. noalias pointer

On Thu, Jun 13, 2013 at 11:39 AM, Guo, Xiaoyi <Xiaoyi.Guo at amd.com<mailto:Xiaoyi.Guo at amd.com>> wrote:
In a multi-threaded environment, in order to ensure the memory ordering expressed by the memory fence, certain memory operations should not be moved across the fence, right?

Yes, but operations on noalias pointers don't fall into that category.  For noalias pointers, while the function is running, any operation on the pointed-to memory has to be based on the noalias pointer.  This applies to all threads in the program, not just the one the function is called from.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130613/9364f365/attachment.html>


More information about the llvm-dev mailing list