dmd codegen improvements

welkam via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 18 15:17:53 PDT 2015


On Tuesday, 18 August 2015 at 21:43:44 UTC, Walter Bright wrote:
> On 8/18/2015 1:33 PM, Jacob Carlborg wrote:
>> There's profile guided optimization, which LLVM supports.
>
> dmd does have that to some extent. If you run with -profile, 
> the profiler will emit a trace.def file. This is a script which 
> can be fed to the linker which controls the layout of functions 
> in the executable. The layout is organized so that strongly 
> connected functions reside in the same page, minimizing 
> swapping and maximizing cache hits.
>
> Unfortunately, nobody makes use of it, which makes me reluctant 
> to expend further effort on PGO.
>
>   http://www.digitalmars.com/ctg/trace.html
>
> I wonder how many people actually use the llvm profile guided 
> optimizations. I suspect very, very few.

People are lazy and if it takes more than one click people wont 
use it. Just like unitesting everyone agrees that its good to 
write them but nobody does that. When you put unitesting in 
compiler more people are writing tests. PGO is awesome, but it 
needs to be made much simpler before people use it everyday.


More information about the Digitalmars-d mailing list