Premium
Ablego : a function outlining and partial inlining framework
Author(s) -
Zhao Peng,
Amaral José Nelson
Publication year - 2006
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.774
Subject(s) - computer science , compiler , partial evaluation , host (biology) , programming language , function (biology) , code (set theory) , optimizing compiler , program transformation , heuristics , transformation (genetics) , set (abstract data type) , syntax , operating system , artificial intelligence , ecology , biochemistry , chemistry , evolutionary biology , gene , biology
Frequently invoked large functions are common in non‐numeric applications. These large functions present challenges to modern compilers not only because they require more time and resources at compilation time, but also because they may prevent optimizations such as function inlining. Often large portions of the code in a hot function f host are executed much less frequently than f host itself. Partial inlining is a natural solution to the problems caused by including cold code segments that are seldom executed into hot functions that are frequently invoked. When applying partial inlining, a compiler outlines cold statements from a hot function f host . After outlining, f host becomes smaller and thus can be easily inlined. This paper presents Ablego , a framework for function outlining and partial inlining that includes several innovations: (1) an abstract‐syntax‐tree‐based analysis and transformation to form cold regions for outlining; (2) a set of flexible heuristics to control the aggressiveness of function outlining; (3) several possible function outlining strategies; (4) explicit variable spilling , a new technique that overcomes negative side‐effects of function outlining. With the proper strategy, partial inlining improves performance by up to 5.75%. A performance study also suggests that partial inlining's effect on enabling more aggressive inlining is limited. The performance improvement from partial inlining actually comes from better code placement and better code generation. Copyright © 2006 John Wiley & Sons, Ltd.