www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - compiler optimizing based on profiler output

reply "Ben Hinkle" <ben.hinkle gmail.com> writes:
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. 
Sep 10 2005
next sibling parent Sean Kelly <sean f4.ca> writes:
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
Sep 10 2005
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"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.
Sep 10 2005