[llvm-commits] [llvm] r137145 - /llvm/trunk/docs/Atomics.html

Chris Lattner clattner at apple.com
Thu Aug 11 13:07:59 PDT 2011


On Aug 9, 2011, at 2:07 PM, Eli Friedman wrote:

> Author: efriedma
> Date: Tue Aug  9 16:07:10 2011
> New Revision: 137145
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=137145&view=rev
> Log:
> First draft of the practical guide to atomics.
> 
> This is mostly descriptive of the intended state once atomic load and store have landed.  

This looks great Eli!  Some requests:

In the intro, please include a link to a Java memory model paper/spec, the C++'0x memory model/spec, and the c'1x memory model proposal/spec as appropriate. 

It would also be good to mention that volatile and consistency are completely orthogonal, and give an example.  It might even make sense to expand the scope of the document to also cover volatile.  It seems that it could be fully described in a paragraph.


In the "Load and store" section, please give an example of the illegal transformation.

In the "Atomic Ordering" section, please make one subsection for each ordering, and then split out "optimizations allowed", "impact on code generation" and "things this corresponds to" in into their own paragraph or something.  The content looks great, but could use some structure to make it easier to digest.

This section should also specify what happens when something is illegal for a target: does the code generator barf, or does it emulate something using open coded operations, or does it use libcalls?


It would be good to explain what LL/SC are in the last section, and generally expand this.  It would be great for a target author to be able to read this section and understand what they need to do and whether or not they care.

Thanks again for working on this!

-Chris



More information about the llvm-commits mailing list