I've updated the original documents on the atomics page http://gcc.gnu.org/wiki/Atomic/GCCMM to add some clarity in places (especially in the 'synchronization models' section) and updated some bitrot.

As mentioned last week, I've added a section on codegen which Aldy has begun implementing: http://gcc.gnu.org/wiki/Atomic/GCCMM/CodeGen

I've also just finished an initial cut of a new page which discusses the optimization effects the different models have. It took a while to whittle it down to something digestible, but I think the interaction is fairly readable now. It is not a complete analysis of each optimization yet, but it does cover how the different models will impact the optimizers and touches on implementation. I'll leave the real gory details until the codegen changes are complete and there is atomic code to play with.

The one-line version is that most optimizations will probably just need tweaking for what to do around built-ins rather than always assuming they are a full barrier.

WIP : http://gcc.gnu.org/wiki/Atomic/GCCMM/Optimizations

I will now pick up where Aldy left off and finish the codegen parts for the mem_exchange instruction. (I might switch that to the load and store operations). Then I'll create some testcases for it, and modify the dead store optimizer as a litmus test. This will give us an implementation sample to see that everything plays together and behaves as expected. If that seems to work out, we'll proceed with the rest of the atomic operations.

If you are interested in the memory model read that newest document and let me know what isn't clear. If you know a lot about this stuff, look at it and let me know what needs fixing. If you don't care, go read your next email :-)

There will also be lots of time to comment when the patch is ready for the 'cxx-mem-model' branch

Andrew

Reply via email to