Register Allocation and Optimal Spill Code Scheduling in Software Pipelined Loops Using 0-1 Integer Linear Programming Formulation

  • Santosh G. Nagarakatte
  • R. Govindarajan
Conference paper

DOI: 10.1007/978-3-540-71229-9_9

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4420)
Cite this paper as:
Nagarakatte S.G., Govindarajan R. (2007) Register Allocation and Optimal Spill Code Scheduling in Software Pipelined Loops Using 0-1 Integer Linear Programming Formulation. In: Krishnamurthi S., Odersky M. (eds) Compiler Construction. CC 2007. Lecture Notes in Computer Science, vol 4420. Springer, Berlin, Heidelberg

Abstract

In achieving higher instruction level parallelism, software pipelining increases the register pressure in the loop. The usefulness of the generated schedule may be restricted to cases where the register pressure is less than the available number of registers. Spill instructions need to be introduced otherwise. But scheduling these spill instructions in the compact schedule is a difficult task. Several heuristics have been proposed to schedule spill code. These heuristics may generate more spill code than necessary, and scheduling them may necessitate increasing the initiation interval.

We model the problem of register allocation with spill code generation and scheduling in software pipelined loops as a 0-1 integer linear program. The formulation minimizes the increase in initiation interval (II) by optimally placing spill code and simultaneously minimizes the amount of spill code produced. To the best of our knowledge, this is the first integrated formulation for register allocation, optimal spill code generation and scheduling for software pipelined loops. The proposed formulation performs better than the existing heuristics by preventing an increase in II in 11.11% of the loops and generating 18.48% less spill code on average among the loops extracted from Perfect Club and SPEC benchmarks with a moderate increase in compilation time.

Download to read the full conference paper text

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Santosh G. Nagarakatte
    • 1
  • R. Govindarajan
    • 1
    • 2
  1. 1.Department of Computer Science and Automation 
  2. 2.Supercomputer Education and Research Center, Indian Institute of Science, Bangalore 560012India

Personalised recommendations