Summary
In this chapter, you learned how to find out the kinds of optimizations that LLVM has to offer by yourself. To this end, you saw two ways to approach this discovery process:
- Top-down: Starting from the
opt
driver’s help message all the way to the implementation - Bottom-up: Starting from the directory structure and filenames to find the implementation and connect that back to
opt
's CLI
You then learned about some of the critical tools that you can leverage to help you understand what the compiler does: the verifier and printer.
After that, you began building your knowledge of what the middle end features. First, you learned about the analysis passes, then the canonicalization passes, and finally, the optimization passes.
While this chapter just scratched the surface of the LLVM ecosystem, it gave you a broad overview of the kind of things you can find.
We believe that with this newly acquired knowledge, you will now be able to...