Combining Register Allocation and Instruction Scheduling

  • Authors:
  • Rajeev Motwani;Krishna V. Palem;Vivek Sarkar;Salem Reyen

  • Affiliations:
  • -;-;-;-

  • Venue:
  • Combining Register Allocation and Instruction Scheduling
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

We formulate combined register allocation and instruction scheduling within a basic block as a single optimization problem, with an objective cost function that more directly captures the primary measure of interest in code optimization --- the completion time of the last instruction. We show that although a simple instance of the combined problem is NP-hard, the combined problem is much easier to solve approximately than graph coloring, which is a common formulation used for the register allocation phase in phase-ordered solutions. Using our framework, we devise a simple and effective heuristic algorithm for the combined problem. This algorithm is called the (alpha,beta)-Combined Heuristic; parameters alpha and beta provide relative weightages for controlling register pressure and instruction parallelism considerations in the combined heuristic. Preliminary experiments indicate that the combined heuristic yields improvements in the range of 16-21% compared to the phase-ordered solutions, when the input graphs contain balanced amount of register pressure and instruction-level parallelism.