[LLVMdev] Proposal for atomic and synchronization instructions

Christopher Lamb christopher.lamb at gmail.com
Mon Jul 9 12:27:52 PDT 2007


On Jul 9, 2007, at 10:33 AM, Scott Michel wrote:

> Torvald Riegel wrote:

>> What are the reasons because of which you picked the Load/Store  
>> model for
>> barriers and not some other kind (e.g., acquire/release/...)?
>
> Chandler looked at what the various current LLVM architectures and
> summarized what he found. What he found are the memory barriers  
> that the
> various processors support.

That being said, it probably would not be difficult to add an  
optional pointer to the membarrier instructions. Thus one could map  
acquire/release semantics onto the membarrier, and it would be up to  
the various optimizations to conservatively determine whether code  
motion is legal given aliasing information.

--
Christopher Lamb



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070709/18dc51d9/attachment.html>


More information about the llvm-dev mailing list