I know I've read about recompilers that use execution profiles to advise the optimizer...yeah, here's a paper on it, apparently from 1993.
JITs don't necessarily do trace optimization; some do, apparently, but the basic JIT generates machine code at runtime, but does so without any knowledge of how the code is used. The only real reason for doing it at runtime is if you want to be able to distribute a machine-independent program (e.g., Java bytecode).
Trace optimization in compilers
Date: 2008-08-25 08:36 pm (UTC)JITs don't necessarily do trace optimization; some do, apparently, but the basic JIT generates machine code at runtime, but does so without any knowledge of how the code is used. The only real reason for doing it at runtime is if you want to be able to distribute a machine-independent program (e.g., Java bytecode).