Efficient data driven run-time code generation

This article is quite old (2004) but it was the first demonstration of the efficiency of code specialization at run-time. This was also the first usage of the term “compilette”. The authors are Karine Brifault and myself.

Compilettes are small code generators which are able to specialize binary programs at run time

The experimentation was done on matrix / vector multiplication in the 3D image construction (matrix are 4x4 coefficient) and on convolutions on images. The processors were Itanium and PowerPC.

This article was published during LCR ‘04: Proceedings of the 7th workshop on Workshop on languages, compilers, and run-time support for scalable systems October 2004

The article is available

Abstract :

Knowledge of data values at run-time allows us to generate better code in terms of efficiency, size and power consump- tion. This paper introduces a low-level compiling technique based on a minimal code generator with parametric embedded sec- tions to generate binary code at run-time. This generator called a “compilet” creates code and allocates registers using the data input. Then, it generates the needed instructions. Our measurements, performed on Itanium 2 and PowerPC platforms have shown a speed improvement of 43% on the Itanium 2 platform and 41% on the PowerPC one.

The proposed technique proves to be particularly useful in the case of intensively reused functions in graphic applica- tions, where the advantages of dynamic compilation have not been fully taken into account yet