Thread overview
compiler optimizing based on profiler output
Sep 10, 2005
Ben Hinkle
Sep 10, 2005
Sean Kelly
Sep 10, 2005
Walter Bright
September 10, 2005
This isn't specific to D but does anyone know of a compiler or language that optimizes based on profiler output? In other words you run the program a few times through typical usage and collect profiler data and then recompile with that profiler data in order to do more optimizations (or less...). I'm curious how effective it is instead of a JIT, for example.


September 10, 2005
In article <dfv1c0$2cqa$1@digitaldaemon.com>, Ben Hinkle says...
>
>This isn't specific to D but does anyone know of a compiler or language that optimizes based on profiler output? In other words you run the program a few times through typical usage and collect profiler data and then recompile with that profiler data in order to do more optimizations (or less...). I'm curious how effective it is instead of a JIT, for example.

The Sun compiler does.  There's an article about it here:

http://developers.sun.com/prodtech/cc/articles/codelayout.html


Sean


September 10, 2005
"Ben Hinkle" <ben.hinkle@gmail.com> wrote in message news:dfv1c0$2cqa$1@digitaldaemon.com...
> This isn't specific to D but does anyone know of a compiler or language
that
> optimizes based on profiler output? In other words you run the program a
few
> times through typical usage and collect profiler data and then recompile with that profiler data in order to do more optimizations (or less...).
I'm
> curious how effective it is instead of a JIT, for example.

You can use the builtin D profiler to order the layout of code to minimize thrashing. See www.digitalmars.com/ctg/trace.html. A linker module definition file, trace.def, will be created which will order the code.