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

Eli Friedman eli.friedman at gmail.com
Thu Aug 11 16:46:10 PDT 2011


On Thu, Aug 11, 2011 at 1:07 PM, Chris Lattner <clattner at apple.com> wrote:
>
> 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.

Done.

> 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.

Done.

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

Done.

> 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.

Done.

> 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?

The atomic operations are supposed to be lock free; I added a couple
bits about that.

> 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.

I tried a bit here; not sure how well I did.

-Eli




More information about the llvm-commits mailing list