Function Outlining

  • Author(s) / Creator(s)
  • Technical report TR04-25. Large functions that are frequently executed, i.e. hot, are common in non-numeric applications. These functions present challenges to modern compilers not only because they require more time and resources for compilation, but also because they might degrade runtime performance by preventing optimizations such as function inlining. Fortunately, often large portions of the code in hot functions are rarely executed, i.e. cold. This paper describes a function outlining technique to split cold regions out of the hot host function so that these functions become smaller and more amenable for other optimizations. Unlike other work, our function outlining occurs in the very early phase in a compiler backend. This early outlining will enable more aggressive optimization in the down-stream phases of the compilation, such as inlining and code placement. We describe challenges to function outlining transformations and our solutions. We found that, with a carefully selected strategy, function outlining reduces the sizes of large hot functions significantly (up to 97% and 39% in average) without hurting performance. This is a very promising starting-point for potential client optimizations such as partial function inlining and code placement. | TRID-ID TR04-25

  • Date created
  • Subjects / Keywords
  • Type of Item
  • DOI
  • License
    Attribution 3.0 International