A randomized heuristic approach to register allocation

  • C. W. Keßler
  • W. J. Paul
  • T. Rauber
Session: Compiler Construction II
Part of the Lecture Notes in Computer Science book series (LNCS, volume 528)


We present a randomized algorithm to generate contiguous evaluations for expression DAGs representing basic blocks of straight line code with nearly minimal register need. This heuristic may be used to reorder the statements in a basic block before applying a global register allocation scheme like Graph Coloring. Experiments have shown that the new heuristic produces results which are about 30% better on the average than without reordering.


Directed Acyclic Graph Basic Block Optimal Evaluation Graph Coloring Decision Node 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley (1986)Google Scholar
  2. [2]
    Chaitin, G.J. et al.: Register allocation via coloring. Computer Languages Vol. 6, 47–57 (1981)Google Scholar
  3. [3]
    Keßler, C.W.: Code—Optimierung quasiskalarer vektorieller Grundblöcke für Vektorrechner. Master thesis (1990), Universität Saarbrücken.Google Scholar
  4. [4]
    Keßler, C.W., Paul, W.J., Rauber, T.: Scheduling Vector Straight Line Code on Vector Processors. Submitted to: First International Conference of the Austrian Center for Parallel Computation, Sept. 30–Oct. 2, 1991, Salzburg (Austria).Google Scholar
  5. [5]
    Mehlhorn, K.: Data Structures and Algorithms 2: Graph Algorithms and NP-Completeness. (1984)Google Scholar
  6. [6]
    Paul, W.J., Tarjan, R.E., Celoni, J.R.: Space bounds for a game on graphs. Math. Systems Theory 10, 239–251 (1977)Google Scholar
  7. [7]
    Rauber, Thomas: An Optimizing Compiler for Vector Processors. Proc. ISMM International Conference on Parallel and Distributed Computing and Systems, New York 1990, Acta press, 97–103Google Scholar
  8. [8]
    Sethi, R., Ullman, J.D.: The generation of optimal code for arithmetic expressions. J. ACM, Vol. 17, 715–728 (1970)Google Scholar
  9. [9]
    Sethi, R.: Complete register allocation problems. SIAM J. Comput. 4, 226–248 (1975)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • C. W. Keßler
    • 1
  • W. J. Paul
    • 1
  • T. Rauber
    • 1
  1. 1.Computer Science DepartmentUniversity SaarbrückenGermany

Personalised recommendations