Optimal Software Pipelining using an SMT-Solver
Jan-Willem Roorda
TL;DR
The paper tackles the problem of generating optimal software-pipelined schedules for loops on VLIW processors, an NP-complete challenge for which prior work relied on heuristics. It introduces an SMT-based framework that encodes modulo scheduling with variables for operation cycles, slot usage, and data routing, and extends it with a lazy, incremental register-pressure model to ensure feasible allocations. Empirical results on 400+ loops across two generations of VLIW cores show the SMT approach yields better schedules than heuristics in most cases (max speed-up 1.22; geometric mean 1.08) and provides useful unsat-core feedback to diagnose infeasibility. The work demonstrates both the practicality and value of exact scheduling in compiler design, while outlining future enhancements such as symmetry-breaking to reduce search space.
Abstract
Software Pipelining is a classic and important loop-optimization for VLIW processors. It improves instruction-level parallelism by overlapping multiple iterations of a loop and executing them in parallel. Typically, it is implemented using heuristics. In this paper, we present an optimal software pipeliner based on a Satisfiability Modulo Theories (SMT) Solver. We show that our approach significantly outperforms heuristic algorithms and hand-optimization. Furthermore, we show how the solver can be used to give feedback to programmers and processor designers on why a software pipelined schedule of a certain initiation interval is not feasible.
