skip to main content
10.1145/1065010.1065031acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Differential register allocation

Published: 12 June 2005 Publication History

Abstract

Micro-architecture designers are very cautious about expanding the number of architected registers (also the register field), because increasing the register field adds to the code size, raises I-cache and memory pressure, complicates processor pipeline. Especially for low-end processors, encoding space could be extremely limited due to area and power considerations. On the other hand, the number of architected registers exposed to the compiler could directly affect the effectiveness of compiler analysis and optimization. For high performance computers, register pressure can be higher than the available registers in some regions, e.g. due to optimizations like aggressive function inlining, software pipelining etc. The compiler cannot effectively perform compilation and optimization if only a small number of registers are exposed through the ISA. Therefore, it is crucial that more architected registers are available at the compiler's disposal without expanding the code size significantly.In this paper, we look at a new register encoding scheme called differential encoding that allows more registers to be addressed in the operand field of instructions than the direct encoding currently being used. We show it can be implemented with very low overhead. Based upon differential encoding, we apply it in several ways such that the extra architected registers can benefit the performance. Three schemes are devised to integrate differential encoding with register allocation. We demonstrate that differential register allocation is helpful in improving the performance of both high-end and low-end processors. Moreover, We can combine it with software pipelining to provide more registers and reduce spills.Our results show that differential encoding significantly reduces the number of spills and speeds up program execution. For a low-end configuration, we achieve over 12% speedup while keeping code size almost unaffected. For optimization on loops, it significantly speeds up loops with high register pressure (over 70% speedup).

References

[1]
Andrew W. Appel and Lal George. Optimal spilling for cisc machines with few registers. In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, pages 243--253, 2001.
[2]
D. Burger and T.M. Austin. The SimpleScalar Tool Set. Version 2.0, Tech. Report No. 1342, Computer Sciences Department, University of Wisconsin-Madison, June 1997.
[3]
Gregory J. Chaitin, Marc A. Auslander, Ashok K. Chandra, John Cocke, Martin E. Hopkins, and Peter W. Markstein. Register allocation via coloring. Computer Language, 6(1):47--57, 1981.
[4]
Keith D. Cooper and Timothy J. Harvey. Compiler-controlled memory. In Proceedings of the eighth international conference on Architectural support for programming languages and operating systems, pages 2--11, 1998.
[5]
Lal George and Andrew W. Appel. Iterated register coalescing. ACM Trans. Program. Lang. Syst., 18(3):300--324, 1996.
[6]
Intel Inc. SA-110 Microprocessor Technical Reference Manual, September 1998.
[7]
Tokuzo Kiyohara, Scott Mahlke, William Chen, Roger Bringmann, Richard Hank, Sadun Anik, and Wen-Mei Hwu. Register connection: a new approach to adding registers into instruction set architectures. In Proceedings of the 20th annual international symposium on Computer architecture, pages 247--256, 1993.
[8]
A. Krishnaswamy and R. Gupta. Profile Guided Selection of ARM and Thumb Instructions. In ACM SIGPLAN Joint Conference on Languages Compilers and Tools for Embedded Systems (LCTES). ACM, June 2002.
[9]
M. S.-L. Lam. A Systolic Array Optimizing Compiler. Carnegie Mellon University, 1987.
[10]
Hsien-Hsin S. Lee, Mikhail Smelyanskiy, Gary S. Tyson, and Chris J. Newburn. Stack value file: Custom microarchitecture for the stack. In Proceedings of the Seventh International Symposium on High-Performance Computer Architecture (HPCA'01), 2001.
[11]
Josep Llosa, Mateo Valero, and Eduard Ayguadé. Heuristics for register-constrained software pipelining. In Proceedings of the 29th annual ACM/IEEE international symposium on Microarchitecture, pages 250--261, 1996.
[12]
MIPS Technologies. MIPS32 Architecture for Programmers Volume IV-a: The MIPS16 Application Specific Extension to the MIPS32 Architecture, March 2001.
[13]
Motorola Inc. Motorola DSP56300 Family Manual, Revision 3.0, November 2000.
[14]
E. Özer, S. Banerjia, and T. M. Conte. Unified assign and schedule: A new approach to scheduling for clustered register file microarchitectures. In Proceedings of the 31st Annual ACM/IEEE International Symposium on Microarchitecture (MICRO-98), pages 308--315, November 1998.
[15]
P.Briggs, K.Cooper, and L.Torczon. Improvements to Graph Coloring Register Allocation. In Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation (PLDI). ACM, 1994.
[16]
B. R. Rau, M. Lee, P. P. Tirumalai, and M. S. Schlansker. Register allocation for software pipelined loops. In Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation, pages 283--299, 1992.
[17]
Andrew M. R.Guthaus, J.S. Ringenberg, D. Ernst, T.M. Austin, T. Mudge, and R.B. Brown. Mibench: A free, commercially representative embedded benchmark suite. In IEEE 4th Annual Workshop on Workload Characterization. IEEE, 2001.
[18]
John Ruttenberg, G. R. Gao, A. Stoutchinin, and W. Lichtenstein. Software pipelining showdown: optimal vs. heuristic methods in a production compiler. In Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, pages 1--11, 1996.
[19]
S. Segars. Low Power Design Techniques for Micro-processors. In IEEE International Solid-State Circuits Conferenc (ISSCC), 2001.
[20]
Jian Wang, Andreas Krall, M. Anton Ertl, and Christine Eisenbeis. Software pipelining with register allocation and spilling. In Proceedings of the 27th annual international symposium on Microarchitecture, pages 95--99, 1994.
[21]
Javier Zalamea, Josep Llosa, Eduard Ayguadé, and Mateo Valero. Improved spill code generation for software pipelined loops. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 134--144, 2000.
[22]
Javier Zalamea, Josep Llosa, Eduard Ayguadé, and Mateo Valero. Two-level hierarchical register file organization for vliw processors. In Proceedings of the 33rd annual ACM/IEEE international symposium on Microarchitecture, pages 137--146, 2000.
[23]
Xiaotong Zhuang, Tao Zhang, and Santosh Pande. Hardware-managed register allocation for embedded processors. In Proceedings of the 2004 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools, pages 192--201, 2004.

Cited By

View all
  • (2012)Doubling the number of registers on ARM processorsProceedings of the 2012 16th Workshop on Interaction between Compilers and Computer Architectures (INTERACT)10.1109/INTERACT.2012.6339620(1-8)Online publication date: 25-Feb-2012
  • (2009)Towards update-conscious compilation for energy-efficient code dissemination in WSNsACM Transactions on Architecture and Code Optimization10.1145/1596510.15965126:4(1-33)Online publication date: 29-Oct-2009
  • (2007)Virtual registersProceedings of the 2nd international conference on High performance embedded architectures and compilers10.5555/1762146.1762154(57-70)Online publication date: 28-Jan-2007
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
June 2005
338 pages
ISBN:1595930566
DOI:10.1145/1065010
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 6
    Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
    June 2005
    325 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1064978
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. architected register
  2. differential dncoding
  3. register allocation

Qualifiers

  • Article

Conference

PLDI05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2012)Doubling the number of registers on ARM processorsProceedings of the 2012 16th Workshop on Interaction between Compilers and Computer Architectures (INTERACT)10.1109/INTERACT.2012.6339620(1-8)Online publication date: 25-Feb-2012
  • (2009)Towards update-conscious compilation for energy-efficient code dissemination in WSNsACM Transactions on Architecture and Code Optimization10.1145/1596510.15965126:4(1-33)Online publication date: 29-Oct-2009
  • (2007)Virtual registersProceedings of the 2nd international conference on High performance embedded architectures and compilers10.5555/1762146.1762154(57-70)Online publication date: 28-Jan-2007
  • (2007)UCCACM SIGPLAN Notices10.1145/1273442.125077842:6(383-393)Online publication date: 10-Jun-2007
  • (2007)UCCProceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/1250734.1250778(383-393)Online publication date: 15-Jun-2007
  • (2007)Allocating architected registers through differential encodingACM Transactions on Programming Languages and Systems10.1145/1216374.121637729:2(9-es)Online publication date: 1-Apr-2007
  • (2005)Efficient Use of Invisible Registers in Thumb CodeProceedings of the 38th annual IEEE/ACM International Symposium on Microarchitecture10.1109/MICRO.2005.19(30-42)Online publication date: 12-Nov-2005
  • (2013)Register allocation for embedded systems to simultaneously reduce energy and temperature on registersACM Transactions on Embedded Computing Systems10.1145/2539036.253904613:3(1-26)Online publication date: 24-Dec-2013

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media