PyPs, a programmable pass manager

Abstract

As hardware platforms are growing in complexity, compiler infrastructures need more exibility: due to the heterogeneity of these platforms, compiler phases must be combined in unusual and dynamic ways, and several tools may need to be combined to handle speci c parts of the compilation process e ciently. The need for exibility also appears in iterative compilation when di erent phase orderings are explored. In this context, we need to assemble pieces of software typically compiler phases without having to dive into the tool internals. The entity in charge of this phase management is called a pass manager . While pass managers used to rely on a statically de ned schedule, the introduction of plugins in gcc and the current trends in compiler design showcased by llvm pave the way for dynamic pass schedulers. The contributions of this paper are a high-level modeling of pass chaining and its implementation in the pips source-to-source compiler framework under the name pyps. As a result, we propose a high level api for building end-to-end specialized compilers with the minimum e orts validated by 5 prototypes detailed in the paper: an iterative compiler, an openmp directive generator, a C-to-cuda translator, a multimedia instruction generator and a C-to-fpga translator.

Extracted Key Phrases

Cite this paper

@inproceedings{Guelton2011PyPsAP, title={PyPs, a programmable pass manager}, author={Serge Guelton and Mehdi Amini and Ronan Keryell and B{\'e}atrice Creusillet}, year={2011} }