Technical requirements
This chapter has the same requirements as Chapter 14.
Similarly, all the snippets presented in this chapter are available in the https://github.com/PacktPublishing/LLVM-Code-Generation-by-example GitHub repository. We call this repository the companion repository in the remainder of the chapter.
The changes for this chapter are all included between the Git tags begin_ch17
and end_ch17
of the companion repository. If you are not familiar with Git tags, look at Chapter 9 for a quick explanation of what you can do with them. Throughout the chapter, we also mention specific tags that we created in this repository for you to easily find the relevant commits.
Before we get to the instruction selection phase, we need to address the RegBankSelect
pass, which is a mandatory phase for GlobalISel between the legalization and the instruction selection phase.