A fast, memory-efficient register allocation framework for embedded systems
Authors:
Open Access
- 1 November 2004
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 26 (6) , 938-974
Abstract
In this work, we describe a "just-in-time," usage density-based register allocator geared toward embedded systems with a limited general-purpose register set wherein speed, code size, and memory requirements are of equal concern. The main attraction of the allocator is that it does not make use of the traditional live range and interval analysis nor does it perform advanced optimizations based on range splitting but results in very good code quality. We circumvent the need for traditional analysis by using a measure of usage density of a variable. The usage density of a variable at a program point represents both the frequency and the density of the uses. We contend that by using this measure we can capture both range and frequency information which is essentially used by the good allocators based on splitting. We describe a framework based on this measure which has a linear complexity in terms of the program size. We perform comparisons with the static allocators based on graph coloring and the ones targeted toward just-in-time compilation systems like linear scan of live ranges. Through comparisons with graph coloring (Brigg's style) and live range-based (linear scan) allocators, we show that the memory footprint and the size of our allocator are smaller by 20% to 30%. The speed of allocation is comparable and the speed of the generated code is better and its size smaller. These attributes make the allocator an attractive candidate for performing a fast, memory-efficient register allocation for embedded devices with a small number of registers.Keywords
This publication has 22 references indexed in Scilit:
- Dynamo2000
- An evaluation of staged run-time optimizations in DyC1999
- A general approach for run-time specialization and its application to C1996
- C: a language for high-level, efficient, and machine-independent dynamic code generation1996
- Efficient register allocation via coloring using clique separatorsACM Transactions on Programming Languages and Systems, 1994
- Improvements to graph coloring register allocationACM Transactions on Programming Languages and Systems, 1994
- The priority-based coloring approach to register allocationACM Transactions on Programming Languages and Systems, 1990
- Spill code minimization techniques for optimizing compliers1989
- Coloring heuristics for register allocation1989
- Register allocation via coloringComputer Languages, 1981