Modeling Universal Instruction Selection

Gabriel Hjort Blindell, Roberto CastaƱeda Lozano, Mats Carlsson, Christian Schulte.

[pdf | bibtex]

Instruction selection implements a program under compilation by selecting processor instructions and has tremendous impact on the performance of the code generated by a compiler. This paper introduces a graph-based universal representation that unifiees data and control flow for both programs and processor instructions. The representation is the essential prerequisite for a constraint model for instruction selection introduced in this paper. The model is demonstrated to be expressive in that it supports many processor features that are out of reach of state-of-the-art approaches, such as advanced branching instructions, multiple register banks, and SIMD instructions. The resulting model can be solved for small to medium size input programs and sophisticated processor instructions and is competitive with LLVM in code quality. Model and representation are significant due to their expressiveness and their potential to be combined with models for other code generation tasks.

In: Gilles Pesant, editor, Twentyfirst International Conference on Principles and Practice of Constraint Programming, Cork, Ireland, volume 9255 of Lecture Notes in Computer Science, pages 609-626. Springer-Verlag, September, 2015. DOI 10.1007/978-3-319-23219-5_42.

Copyright Springer-Verlag, the original publication is available at www.springerlink.com