Instruction Code Selection - Ebner, Dietmar; Krall, Andreas; Scholz, Bernhard (SSA-based Compiler Design, 2022)
In this chapter, we introduce how SSA form can be used for instruction selection. Instruction selection translates a machine-independent intermediate code representation into a low-level intermediate representation or into machine code. Classical techniques specialize for specific target architectures and limit the scope to statement level. In this chapter, we present an optimal technique for intra-procedural instruction selection that uses partitioned Boolean quadratic optimization. The presented approach goes beyond limitations such as instruction selection expressed as trees and permits complex acyclic graph patterns in order to find the most suitable complex instructions in an instruction set. Such instructions can have multiple inputs and results at the same time.