Dynamic function specialization
Authors:
- 1 July 2017
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 163-170
Abstract
Function specialization is a compilation technique that consists in optimizing the body of a function for specific values of an argument. Different versions of a function are created to deal with the most frequent values of the arguments, as well as the default case. Compilers can do a better optimization with the knowledge of run-time behaviour of the program. Static compilers, however, can hardly predict the exact value/behaviour of arguments, and even profiling collected during previous runs is never guaranteed to capture future behaviour. We propose a dynamic function specialization technique, that captures the actual values of arguments during execution of the program and, when profitable, creates specialized versions and include them at runtime. Our approach relies on dynamic binary rewriting. We present the principles and implementation details of our technique, analyze sources of overhead, and present our results.Keywords
This publication has 10 references indexed in Scilit:
- Intercepting Functions for MemoizationACM Transactions on Architecture and Code Optimization, 2015
- JIT technology with C/C++ACM Transactions on Architecture and Code Optimization, 2013
- Scenario Based Optimization: A Framework for Statically Enabling Online Optimizations2009
- SPEC CPU2006 benchmark descriptionsACM SIGARCH Computer Architecture News, 2006
- A tour of Tempo: a program specializer for the C languageScience of Computer Programming, 2004
- LLVM: A compilation framework for lifelong program analysis & transformation2004
- A portable approach to dynamic optimization in run-time specializationNew Generation Computing, 2002
- Static and Dynamic Program Compilation by Interpreter SpecializationHigher-Order and Symbolic Computation, 2000
- Compiler transformations for high-performance computingACM Computing Surveys, 1994
- Unrolling loops in fortranSoftware: Practice and Experience, 1979