Instruction Selection
The heart of any backend is instruction selection. LLVM implements several approaches; in this chapter, we will implement instruction selection via the selection directed acyclic graph (DAG) and with global instruction selection.
In this chapter, you will learn about the following topics:
- Defining the rules of the calling convention: This section shows you how to describe the rules of a calling convention in the target description
- Instruction selection via the selection DAG: This section teaches you how to implement instruction selection with a graph data structure
- Adding register and instruction information: This section explains how to access information in the target description, and what additional information you need to provide
- Putting an empty frame lowering in place: This section introduces you to the stack layout and the prologue of a function
- Emitting machine instructions: This section tells you how machine instructions are...