Integrated Code Generation for Loops

  • Authors:
  • Mattias Eriksson;Christoph Kessler

  • Affiliations:
  • Linköping University;Linköping University

  • Venue:
  • ACM Transactions on Embedded Computing Systems (TECS)
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Code generation in a compiler is commonly divided into several phases: instruction selection, scheduling, register allocation, spill code generation, and, in the case of clustered architectures, cluster assignment. These phases are interdependent; for instance, a decision in the instruction selection phase affects how an operation can be scheduled We examine the effect of this separation of phases on the quality of the generated code. To study this we have formulated optimal methods for code generation with integer linear programming; first for acyclic code and then we extend this method to modulo scheduling of loops. In our experiments we compare optimal modulo scheduling, where all phases are integrated, to modulo scheduling, where instruction selection and cluster assignment are done in a separate phase. The results show that, for an architecture with two clusters, the integrated method finds a better solution than the nonintegrated method for 27% of the instances.