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

Eli Friedman eli.friedman at gmail.com
Thu Jun 13 11:52:40 PDT 2013


On Thu, Jun 13, 2013 at 11:39 AM, Guo, Xiaoyi <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/2371a2e5/attachment.html>


More information about the llvm-dev mailing list