[LLVMdev] Replacing Platform Specific IR Codes with Generic Implementation and Introducing Macro Facilities
David Chisnall
David.Chisnall at cl.cam.ac.uk
Sat May 10 07:47:37 PDT 2014
On 10 May 2014, at 13:53, Tim Northover <t.p.northover at gmail.com> wrote:
> It doesn't make sense for everything though, particularly if you want
> target-specific IR to simply not exist. What would you map ARM's
> "ldrex" to on x86?
This isn't a great example. Having load-linked / store-conditional in the IR would make a number of transforms related to atomics easier. We currently can't correctly model the weak compare-and-exchange from the C[++]11 memory model and we generate terrible code for a number of common atomic idioms on non-x86 platforms as a result.
David
More information about the llvm-dev
mailing list