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 the addition of passes at extension points, and you learned how you can register passes at these points. This allows you to extend the optimization pipeline with your developed passes or existing passes.
In the next chapter, you will learn the basics of the TableGen language, which is used extensively in LLVM and clang
to significantly reduce manual programming.