The PACE Project is developing an architecture aware compiler environment. Rice University is the lead site, with active participants at ET International, Ohio State, Stanford, and Texas Instruments.

 
Loading...

PACE Project Overview

The Platform-Aware Compilation Environment (PACE) Project is developing tools and techniques to automate the process of retargeting an optimizing compiler for a new system. The basic approach is 

  • to recast code optimization so that both the individual optimizations and the overall optimization strategy are parameterized by characteristics of the target system;
  • to automate the measurement of those characteristics; and
  • to provide both immediate runtime support and longer term intelligent support (through machine learning) for the parameter-driven optimization.

The PACE environment approaches performance portability in a new way. Rather than focusing on the details of generating machine code for a new system, PACE relies on a pre-existing native C compiler for the target system and focuses on generating customized C source code for that compiler. In essence, PACE uses the native compiler as its code generator. As with all good compilers, it tries to transform the code that it feeds the code generator into a shape from which the code generator can produce efficient code.

Over the last twenty years, the average time to develop a high-quality compiler for a new system has ranged between three and five years. Given the rapid evolution of modern computer systems, and the correspondingly short lifetimes of those systems, the result is that quality compilers appear for a new system only at the end of its useful lifetime, or later.

Several factors contribute to the lag time between the appearance of a new computer system and the availability of high-quality compilation support for it. The compiler may need to deal with a new instruction set architecture. Existing optimizations must be retargeted to the new system; those optimizations may not expose the right set of parameters to simplify retargeting. Finally, the new system may present features that are not well addressed by existing optimizations, such as the DMA interfaces on the IBM Cell processor. In such cases, the retargeting effort may require invention and implementation of new transformations to address system-specific innovations. 

    The PACE system attacks the first two problems.

  • PACE will rely on a native C compiler for code generation---not for optimization, but to emit the appropriate assembly language code.  Native compilers will vary in the quality of the code that they produce.  For a native compiler that does a competent job of optimization for the target machine, PACE will leverage that investment and rely on the transformations that it does well. For a less competent compiler, PACE will include a suite of optimizations that can produce low-level C code that compiles directly into reasonably efficient assembly code.
  • PACE will include a suite of transformations that are parameterized by characteristics of the target system---both hardware and software.  These transformations will use specific, measured characteristics to model the target system and will reshape the code accordingly. These transformations are retargeted by changing the values of the system characteristics that they use as parameters. The behavior of the compiler will change with the values of the system characteristics.

PACE does not address the final problem. It will, however, free the compiler writer to focus on new transformations to address new architectural features.

Thus, PACE transforms the problem of tuning the optimizer for a new system into the problem of deriving values for key system characteristics. PACE includes a set of portable tools that measure those characteristics. Thus to retarget the optimizer, an installer runs the characterization tools and installs the compiler.

Finally, because the values of some important characteristics of both the application and the system cannot be determined accurately until runtime, PACE includes a runtime system that can adjust optimization parameters in compiler-generated code. The runtime system makes specific and precise measurements of runtime performance. It is capable of identifying rate-limiting resources by region. It can report the results of these analyses to either the end user or to the other components in the PACE system.