Summary
In this chapter, you learned how to create a new Pass for LLVM. You ran the Pass using a Pass pipeline description and an extension point. You extended your compiler with the construction and execution of a Pass pipeline similar to clang, turning tinylang
into an optimizing compiler. The Pass pipeline allows you to add Passes at extension points, and you learned how to register Passes at these points. This enables you to extend the optimization pipeline with your own developed Passes or existing Passes.
In the next chapter, we will explore how LLVM generates machine instructions from the optimized IR.