@inproceedings{fe8cf3633515470498afe97cb634aec0,
title = "Generalized instruction selection using SSA-graphs",
abstract = "Instruction selection is a well-studied compiler phase that translatesthe compiler's intermediate representation of programs to asequence of target-dependent machine instructions optimizing forvarious compiler objectives (e.g. speed and space). Most existinginstruction selection techniques are limited to the scope of a singlestatement or a basic block and cannot cope with irregular instructionsets that are frequently found in embedded systems.We consider an optimal technique for instruction selection thatuses Static Single Assignment (SSA) graphs as an intermediaterepresentation of programs and employs the Partitioned BooleanQuadratic Problem (PBQP) for finding an optimal instruction selection.While existing approaches are limited to instruction patternsthat can be expressed in a simple tree structure, we considercomplex patterns producing multiple results at the sametime including pre/post increment addressing modes, div-mod instructions,and SIMD extensions frequently found in embeddedsystems. Although both instruction selection on SSA-graphs andPBQP are known to be NP-complete, the problem can be solvedefficiently - even for very large instances.Our approach has been implemented in LLVM for an embeddedARMv5 architecture. Extensive experiments show speedups of upto 57\% on typical DSP kernels and up to 10\% on SPECINT 2000and MiBench benchmarks. All of the test programs could be compiledwithin less than half a minute using a heuristic PBQP solverthat solves 99.83\% of all instances optimally.",
keywords = "Code generation, Compiler, Instruction selection, PBQP",
author = "Dietmar Ebner and Florian Brandner and Bernhard Scholz and Andreas Krall and Peter Wiedermann and Albrecht Kadlec",
year = "2008",
month = dec,
day = "1",
doi = "10.1145/1375657.1375663",
language = "English",
isbn = "9781605581040",
series = "Proceedings of the ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES)",
pages = "31--40",
booktitle = "LCTES'08 - Proceedings of the 2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems",
note = "2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, LCTES 2008 ; Conference date: 12-06-2008 Through 13-06-2008",
}