Fast, effective dynamic compilation
- 1 May 1996
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 31 (5), 149-159
- https://doi.org/10.1145/231379.231409
Abstract
Dynamic compilation enables optimization based on the values of invariant data computed at run-time. Using the values of these run-time constants, a dynamic compiler can eliminate their memory loads, perform constant propagation and folding, remove branches they determine, and fully unroll loops they bound. However, the performance benefits of the more efficient, dynamically-compiled code are offset by the run-time cost of the dynamic compile. Our approach to dynamic compilation strives for both fast dynamic compilation and high-quality dynamically-compiled code: the programmer annotates regions of the programs that should be compiled dynamically; a static, optimizing compiler automatically produces pre-optimized machine-code templates, using a pair of dataflow analyses that identify which variables will be constant at run-time; and a simple, dynamic compiler copies the templates, patching in the computed values of the run-time constants, to produce optimized, executable code. Our work targets general- purpose, imperative programming languages, initially C. Initial experiments applying dynamic compilation to C programs have produced speedups ranging from 1.2 to 1.8.Keywords
This publication has 17 references indexed in Scilit:
- A general approach for run-time specialization and its application to CPublished by Association for Computing Machinery (ACM) ,1996
- Combining analyses, combining optimizationsACM Transactions on Programming Languages and Systems, 1995
- Extensibility safety and performance in the SPIN operating systemPublished by Association for Computing Machinery (ACM) ,1995
- Specializing shadersPublished by Association for Computing Machinery (ACM) ,1995
- DCGPublished by Association for Computing Machinery (ACM) ,1994
- Optimizing dynamically-dispatched calls with run-time type feedbackPublished by Association for Computing Machinery (ACM) ,1994
- The multiflow trace scheduling compilerThe Journal of Supercomputing, 1993
- Global register allocation at link timePublished by Association for Computing Machinery (ACM) ,1986
- Efficient implementation of the smalltalk-80 systemPublished by Association for Computing Machinery (ACM) ,1984
- Parallel processingPublished by Association for Computing Machinery (ACM) ,1984