An Application of Constraint Programming to Superblock Instruction Scheduling

  • Authors:
  • Abid M. Malik;Michael Chase;Tyrel Russell;Peter Beek

  • Affiliations:
  • Cheriton School of Computer Science, University of Waterloo, Waterloo, Canada N2L 3G1;Cheriton School of Computer Science, University of Waterloo, Waterloo, Canada N2L 3G1;Cheriton School of Computer Science, University of Waterloo, Waterloo, Canada N2L 3G1;Cheriton School of Computer Science, University of Waterloo, Waterloo, Canada N2L 3G1

  • Venue:
  • CP '08 Proceedings of the 14th international conference on Principles and Practice of Constraint Programming
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modern computer architectures have complex features that can only be fully taken advantage of if the compiler schedules the compiled code. A standard region of code for scheduling in an optimizing compiler is called a superblock. Scheduling superblocks optimally is known to be NP-complete, and production compilers use non-optimal heuristic algorithms. In this paper, we present an application of constraint programming to the superblock instruction scheduling problem. The resulting system is both optimal and fast enough to be incorporated into production compilers, and is the first optimal superblock scheduler for realisticarchitectures. In developing our optimal scheduler, the keys to scaling up to large, real problems were in applying and adapting several techniques from the literature including: implied and dominance constraints, impact-based variable ordering heuristics, singleton bounds consistency, portfolios, and structure-based decomposition techniques. We experimentally evaluated our optimal scheduler on the SPEC 2000 benchmarks, a standard benchmark suite. Depending on the architectural model, between 98.29% to 99.98% of all superblocks were solved to optimality. The scheduler was able to routinely solve the largest superblocks, including superblocks with up to 2,600 instructions, and gave noteworthy improvements over previous heuristic approaches.