Summary
In this chapter, you learned how to set up and implement the RegisterBankInfo
class of your target for GlobalISel. You saw that this pass focuses on optimizing cross-register bank copies and that this feature is unique to GlobalISel.
You then focused on the instruction selection phase itself where you learned how to use the selection patterns to describe the matching of your instructions from the generic IR of your selectors – namely, the SelectionDAG IR and the generic Machine IR (and to some extent, the LLVM IR) – to produce your target-specific MachineInstr
instances.
You saw how these patterns can be augmented with advanced constructs such as pattern fragments that allow you to do partial matching and complex patterns that allow you to describe your matching with pure C++ functions.
Then, you learned how to integrate your patterns in your selectors and saw that you already did the heavy lifting for both SDISel and FastISel in Chapter 14. For GlobalISel...