Adding atomic primops

Simon Marlow marlowsd at gmail.com
Tue May 13 11:08:14 UTC 2014


On 12/05/2014 14:18, Johan Tibell wrote:
> Hi all,
>
> I'm not sure how to continue from here. The current backend story feels
> a bit shaky. Do we think we accurately need to reflect the memory model
> in Cmm before we should venture into this area at all, or are we
> comfortable relying on the current implementation of CallishMachOps with
> the knowledge that if we ever want to move loads/stores past those
> calls, we need to address the memory model issue then?

Just document what you expect the semantics to be (e.g. what kind of 
barrier each operation is), and any future optimisations in CmmSink and 
elsewhere will need to respect that.

I'd put that documentation in CmmSink which is where we already have 
similar kinds of documentation.  It would probably be better to move it 
into a wiki page at some point though.

Cheers,
Simon


More information about the ghc-devs mailing list