Abstract
Register allocation is an integral part of compilation, regardless of whether a compiler aims for fast compilation or optimal code quality. State-of-the-art dynamic compilers often use global register allocation approaches such as linear scan. Recent results suggest that non-global trace-based register allocation approaches can compete with global approaches in terms of allocation quality. Instead of processing the whole compilation unit (i.e., method) at once, a trace-based register allocator divides the problem into linear code segments, called traces.
In this work, we present a register allocation framework that can exploit the additional flexibility of traces to select different allocation strategies based on the characteristics of a trace. This provides us with fine-grained control over the trade-off between compile time and peak performance in a just-in-time compiler.
Our framework features three allocation strategies: a linear-scan-based approach that achieves good code quality, a single-pass bottom-up strategy that aims for short allocation times, and an allocator for trivial traces.
To demonstrate the flexibility of the framework, we select 8 allocation policies and show their impact on compile time and peak performance. This approach can reduce allocation time by 7%--43% at a peak performance penalty of about 1%--11% on average.
For systems that do not focus on peak performance, our approach allows to adjust the time spent for register allocation, and therefore the overall compilation time, thus finding the optimal balance between compile time and peak performance according to an application's requirements.
| Original language | English |
|---|---|
| Title of host publication | Proceeding ManLang 2017 Proceedings of the 14th International Conference on Managed Languages and Runtimes |
| Place of Publication | New York |
| Publisher | ACM |
| Pages | 92-104 |
| Number of pages | 13 |
| ISBN (Print) | 978-1-4503-5340-3 |
| DOIs | |
| Publication status | Published - Sept 2017 |
Fields of science
- 102 Computer Sciences
- 102009 Computer simulation
- 102011 Formal languages
- 102013 Human-computer interaction
- 102022 Software development
- 102024 Usability research
- 102029 Practical computer science
JKU Focus areas
- Computation in Informatics and Mathematics
- Engineering and Natural Sciences (in general)