Optimal Live Range Merge for Address Register Allocation in Embedded Programs

  • Guilherme Ottoni
  • Sandro Rigo
  • Guido Araujo
  • Subramanian Rajagopalan
  • Sharad Malik
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2027)

Abstract

The increasing demand for wireless devices running mobile applications has renewed the interest on the research of high performance low power processors that can be programmed using very compact code. One way to achieve this goal is to design specialized processors with short instruction formats and shallow pipelines. Given that it enables such architectural features, indirect addressing is the most used addressing mode in embedded programs. This paper analyzes the problem of allocating address registers to array references in loops using auto-increment addressing mode. It leverages on previous work, which is based on a heuristic that merges address register live ranges. We prove, for the first time, that the merge operation is NP-hard in general, and show the existence of an optimal linear-time algorithm, based on dynamic programming, for a special case of the problem.

References

  1. 1.
    Aho, A., Sethi, R., and Ullman, J. Compilers, Principles, Techniques and Tools. Addison Wesley, Boston, 1986.Google Scholar
  2. 2.
    Analog Devices. ADSP-2100 Family User’s Manual.Google Scholar
  3. 3.
    Araujo, G., Sudarsanam, A., and Malik, S. Instruction set design and optimizations for address computation in DSP processors. In 9th International Symposium on Systems Synthesis (November 1996), IEEE, pp. 31–37.Google Scholar
  4. 4.
    Briggs, P., Cooper, K., Kennedy, K., and Torczon, L. Coloring heuristics for register allocation. In Proc. of the ACM SIGPLAN’89 on Conference on Programming Language Design and Implementation (June 1982), pp. 98–105.Google Scholar
  5. 5.
    Chaitin, G. Register allocation and spilling via graph coloring. In Proc. of the ACM SIGPLAN’82 Symposium on Compiler Construction (June 1982), pp. 98–105.Google Scholar
  6. 6.
    Chow, F., and Hennessy, J. L. The priority-based coloring approach to register allocation. ACM Trans. Program. Lang. Syst. 12, 4 (October 1990), 501–536.CrossRefGoogle Scholar
  7. 7.
    Cintra, M., and Araujo, G. Array reference allocation using SSA-Form and live range growth. In Proceedings of the ACM SIGPLAN LCTES 2000 (June 2000), pp. 26–33.Google Scholar
  8. 8.
    Cytron, R., Ferrante, J., Rosen, B., Wegman, M., and Zadeck, F. An efficient method of computing static single assignment form. In Proc. of the ACM POPL’89 (1989), pp. 23–25.Google Scholar
  9. 9.
    Eckstein, E., and Krall, A. Minimizing cost of local variables access for DSP-processors. In LCTES’99 Workshop on Languages, Compilers and Tools for Embedded Systems (Atlanta, July 1999), Y. A. Liu and R. Wilhelm, Eds., vol. 34(7) of SIGPLAN, ACM, pp. 20–27.Google Scholar
  10. 10.
    Garey, M., and Johnson, D. Computers and Intractability. W. H. Freeman and Company, New York, 1979.MATHGoogle Scholar
  11. 11.
    Gebotys, C. DSP address optimization using a minimum cost circulation technique. In Proceedings of the International Conference on Computer-Aided Design (November 1997), IEEE, pp. 100–103.Google Scholar
  12. 12.
    Gupta, R., Soffa, M., and Ombres, D. Efficient register allocation via coloring using clique separators. ACM Trans. Programming Language and Systems 16, 3 (May 1994), 370–386.CrossRefGoogle Scholar
  13. 13.
    Leupers, R., Basu, A., and Marwedel, P. Optimized array index computation in DSP programs. In Proceedings of the ASP-DAC (February 1998), IEEE.Google Scholar
  14. 14.
    Liao, S., Devadas, S., Keutzer, K., Tjiang, S., and Wang, A. Storage assignment to decrease code size. ACM Transactions on Programming Languages and Systems 18, 3 (1996), 235–253.CrossRefGoogle Scholar
  15. 15.
    Motorola. DSP56000/DSP56001 Digital Signal Processor User’s Manual, 1990.Google Scholar
  16. 16.
    Muchnick, S. S. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, 1997.Google Scholar
  17. 17.
    Pohua P. CHANG SCOTT A. Mahlke William Y. Chen, N. J. W., and Mei W. Hwu, W. Impact: An architectural framework for multiple-instruction-issue processors. 266–275.Google Scholar
  18. 18.
    Potkonjak, C. L. M., and Mangione-Smith, W. H. Mediabench: A tool for evaluating and synthesizing multimedia and communications systems.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Guilherme Ottoni
    • 1
  • Sandro Rigo
    • 1
  • Guido Araujo
    • 1
  • Subramanian Rajagopalan
    • 2
  • Sharad Malik
    • 2
  1. 1.University of CampinasCampinasBrazil
  2. 2.Princeton UniversityPrincetonUSA

Personalised recommendations