[dmd-internals] Code motion across volatile{Load, Store}

David Nadlinger via dmd-internals dmd-internals at puremagic.com
Mon Aug 10 05:24:44 PDT 2015


On 10 Aug 2015, at 11:37, Martin Nowak via dmd-internals wrote:
> On 07/11/2015 08:27 PM, David Nadlinger via dmd-internals wrote:
>> With 2.067 the volatileLoad and volatileStore intrinsics were added, 
>> which are directly lowered to loads and stores. Is DMD's optimizer 
>> overly conservative here and prohibits *all* code motion across these 
>> […]
>
> No unnecessary hacks please, let's simply add intrinsics to dmd.
> https://issues.dlang.org/show_bug.cgi?id=13713

Sure, this would be a much better solution. However, I have little 
inclination of digging into the DMD backend to add this myself. And 
given that Walter and Andrei still do not seem to acknowledge the 
importance of a well-defined and reasonably fine-grained memory model 
for today's high performance code, I am not holding my breath for 
somebody else to do it. (Ab)using volatile{Load, Store} would have 
simple been a quick fix for the currently abysmal DMD codegen on x86.

  — David


More information about the dmd-internals mailing list