kirancodes.me
To Proof Maintenance & Beyond!

Dominance-based duplication simulation (DBDS): code duplication to enable compiler optimizations

David Leopoldseder, Lukas Stadler, Thomas Würthinger, Josef Eisl, Doug Simon, Hanspeter Mössenböck

Abstract

Compilers perform a variety of advanced optimizations to improve the quality of the generated machine code. However, optimizations that depend on the data flow of a program are often limited by control-flow merges. Code duplication can solve this problem by hoisting, i.e. duplicating, instructions from merge blocks to their predecessors. However, finding optimization opportunities enabled by duplication is a non-trivial task that requires compile-time intensive analysis. This imposes a challenge on modern (just-in-time) compilers: Duplicating instructions tentatively at every control flow merge is not feasible because excessive duplication leads to uncontrolled code growth and compile time increases. Therefore, compilers need to find out whether a duplication is beneficial enough to be performed.

Related papers