Register allocation using lazy saves, eager restores, and greedy shuffling

  • Authors:
  • Robert G. Burger;Oscar Waddell;R. Kent Dybvig

  • Affiliations:
  • Indiana University Computer Science Department, Lindley Hall 215, Bloomington, Indiana;Indiana University Computer Science Department, Lindley Hall 215, Bloomington, Indiana;Indiana University Computer Science Department, Lindley Hall 215, Bloomington, Indiana

  • Venue:
  • PLDI '95 Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents a fast and effective linear intraprocedural register allocation strategy that optimizes register usage across procedure calls. It capitalizes on our observation that while procedures that do not contain calls (syntactic leaf routines) account for under one third of all procedure activations, procedures that actually make no calls (effective leaf routines) account for over two thirds of all procedure activations. Well-suited for both caller-and calle-save registers, our strategy employs a “lazy” save mechanism that avoids saves for all effective leaf routines, an “eager” restore mechanism that reduces the effect of memory latency, and a “greedy” register shuffling algorithm that does a remarkbly good job of minimizing the need for temporaries in setting up procedure calls.