Machine Execution and Improvements

The LLVM based compiler framework exploits the code representation to provide a combination of five capabilities that is believed to be important in order to support lifelong analysis and transformation for arbitrary programs. In general, these capabilities are quite difficult to obtain simultaneously, but the AuxViom design does so inherently:
• Persistent program information
• Offline code generation
• User-based profiling and optimization
• Transparent runtime model
• Uniform, whole-program compilation

Above figure shows the high-level architecture of the LLVM based AuxViom system. Briefly, static compiler front-ends emit code in the LLVM representation, which is combined together by the LLVM linker. The linker performs a variety of link-time optimizations, especially inter-procedural ones. The resulting LLVM code is then translated to native code for a given target at link-time or install-time, and the LLVM code is saved with the native code. It is also possible to translate LLVM code at runtime with a just in-time translator. The native code generator inserts light-weight instrumentation to detect frequently executed code regions (currently loop nests and traces, but potentially also functions), and these can be optimized at runtime. The profile data collected at runtime represent the end-user’s not the developer’s runs, and can be used by an offline optimizer to perform aggressive profile driven optimizations in the field during idle-time, tailored to the specific target machine.

The LLVM representation is language independent, allowing all the code for a program, including system libraries and portions written in different languages, to be compiled and optimized together. The LLVM compiler framework is designed to permit optimization at all stages of a software lifetime, including extensive static optimization, online optimization using information from the LLVM code, and idle-time optimization using profile information gathered from programmers in the field.

Was this article helpful?

Related Articles