[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

Fast, frequency-based, integrated register allocation and instruction scheduling

Published: 01 September 2008 Publication History

Abstract

Instruction scheduling and register allocation are two of the most important optimization phases in modern compilers as they have a significant impact on the quality of the generated code. Unfortunately, the objectives of these two optimizations are in conflict with one another. The instruction scheduler attempts to exploit instruction-level parallelism and requires many operands to be available in registers. On the other hand, the register allocator wants register pressure to be kept low so that the amount of spill code can be minimized. Currently these two phases are done separately, typically in three passes: prepass scheduling, register allocation and postpass scheduling. But this separation can lead to poor results. Previous works attempted to solve the phase-ordering problem by combining the instruction scheduler with graph-coloring-based register allocators. The latter tend to be computationally expensive. Linear-scan register allocators, on the other hand, are simple, fast and efficient. In this paper, we describe our effort to integrate instruction scheduling with a linear-scan allocator. Furthermore, our integrated optimizer is able to take advantage of execution frequencies obtained through profiling. Our integrated register allocator and instruction scheduler achieved good code quality with significantly reduced compilation times. On the SPEC2000 benchmarks running on a 900 MHz ItaniumII, compared with OpenIMPACT, we halved the time spent in instruction scheduling and register allocation with negligible impact on execution times. Copyright © 2007 John Wiley & Sons, Ltd.

References

[1]
Goodman JR, Hsu WC. Code scheduling and register allocation in large basic blocks. International Conference on Supercomputing, St. Malo, France, 1988; 442-452.
[2]
Bradlee DG, Eggers SJ, Henry RR. Integrating register allocation and instruction scheduling for RISCs. Fourth International Conference on ASPLOS, Santa Clara, CA, U.S.A., 1991; 122-131.
[3]
Norris C, Pollock LL. A scheduler-sensitive global register allocator. Supercomputing, Portland, OR, U.S.A., 1993; 804-813.
[4]
Norris C, Pollock LL. An experimental study of several cooperative register allocation and instruction scheduling strategies. Twenty-eighth Annual International Symposium on Microarchitecture, Ann Arbor, MI, U.S.A., 1995; 169-179.
[5]
Pinter SS. Register allocation with instruction scheduling: A new approach. SIGPLAN Conference on Programming Language Design and Implementation, Albuquerque, NM, U.S.A., 1993; 248-257.
[6]
Berson DA. Unification of register allocation and instruction scheduling in compilers for fine grain architectures. PhD Thesis, Department of Computer Science, University of Pittsburgh, Pittsburgh, 1996.
[7]
Chen G. Effective instruction scheduling with limited registers. PhD Thesis, Division of Engineering and Applied Sciences, Harvard University, 2001.
[8]
Berson DA, Gupta R, Sofia ML. Integrated instruction scheduling and register allocation techniques. Languages and Compilers for Parallel Computing (Lecture Notes in Computer Science, vol. 1656), 1998; 247-262.
[9]
Win KKK, Wong WF. Cooperative instruction scheduling with linear scan register allocation. HiPC, Goa, India, 2005; 528-537.
[10]
Motwani R, Palem KV, Sarkar V, Reyen S. Combining register allocation and instruction scheduling. Technical Report CS-TN-95-22, 1995.
[11]
Lowney PG, Freudenberger SM, Karzes TJ, Lichtenstein WD, Nix RP, O'Donnell JS, Ruttenberg JC. The multiflow trace scheduling compiler. The Journal of Supercomputing 1993; 7(1-2):51-142.
[12]
Chaitin GJ, Auslander MA, Chandra AK, Cocke J, Hopkins ME, Markstein PW. Register allocation via coloring. Computer Languages 1981; 6(1):47-57.
[13]
Briggs P, Cooper KD, Torczon L. Improvements to graph coloring register allocation. ACM Transactions on Programming: Languages and Systems 1994; 16(3):428-455.
[14]
George L, Appel A. Iterated register coalescing. ACM Transactions on Programming Languages and Systems 1996 18(3):300-324.
[15]
Chow FC, Hennessy JL. Register allocation by priority-based coloring. ACM SIGPLAN Symposium on Compiler Construction, Montreal, Canada, 1984; 222-232.
[16]
Poletto M, Engler DR, Kaashoek MF. Tcc: A system for fast, flexible, and high-level dynamic code generation. SIGPLAN Conference on Programming Language Design and Implementation, Las Vegas, NV, U.S.A., 1997; 109-121.
[17]
Poletto M, Sarkar V. Linear scan register allocation. ACM Transactions on Programming Languages and Systems 1999 21(5):895-913.
[18]
Johansson E, Pettersson M, Sagonas KF. A high performance Erlang system. Proceedings of the 2nd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, Montreal, Quebec, Canada, 2000 32-43.
[19]
Sagonas KF, Stenman E. Experimental evaluation and improvements to linear scan register allocation. Software--Practice and Experience 2003; 33(11):1003-1034.
[20]
Mössenböck H, Pfeiffer M. Linear scan register allocation in the context of SSA form and register constraints. Proceedings of the 11th International Conference an Compiler Construction, Grenoble, France, 2002; 229-246.
[21]
Wimmer C, Mössenböck H. Optimized interval splitting in a linear scan register allocator. Proceedings of the 1st ACM/USENIX International Conference on Virtual Execution Environments, Chicago, IL, U.S.A., 2005; 132-141.
[22]
Traub O, Holloway GH, Smith MD. Quality and speed in linear-scan register allocation. SIGPLAN Conference on Programming Language Design and Implementation, Montreal, Quebec, Canada, 1998; 142-151.
[23]
Aho AV, Sethi R, Ullman JD. Compilers: Principles, Techniques and Tools (1st edn). Addison-Wesley: Reading, MA 1986.
[24]
Muchnick SS. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc.: Los Altos, CA, 1997.
[25]
Open IMPACT website, http://www.gelato.uiuc.edu {14 September 2006}.
[26]
Standard Performance Evaluation Corporation. http://www.spec.org/cpu2000/ {14 September 2006}.

Cited By

View all
  • (2017)The Register Allocation and Instruction Scheduling ChallengeProceedings of the 21st Brazilian Symposium on Programming Languages10.1145/3125374.3125380(1-9)Online publication date: 21-Sep-2017

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Software
Software  Volume 38, Issue 11
September 2008
108 pages
ISSN:0038-0644
EISSN:1097-024X
Issue’s Table of Contents

Publisher

John Wiley & Sons, Inc.

United States

Publication History

Published: 01 September 2008

Author Tags

  1. code generation
  2. compilers
  3. instruction scheduling
  4. optimization
  5. register allocation

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2017)The Register Allocation and Instruction Scheduling ChallengeProceedings of the 21st Brazilian Symposium on Programming Languages10.1145/3125374.3125380(1-9)Online publication date: 21-Sep-2017

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media