Summary
In this chapter, you learned about the various pieces of the LLVM infrastructure that you can use to help you debug your compiler.
These pieces are as follows:
- Debug logs and statistics that come built into LLVM passes and that you can enable with the
debug-only
andstats
command-line options - The
llvm-reduce
andbugpoint
command-line tools, which can automatically shrink the size of the input IR - The sanitizers that you can enable in your build configuration to catch diverse kinds of problems
- The
dump
method, which you can use to inspect the state of most LLVM objects
Now, you can approach every problem with the right tool and with confidence!
In the next chapter, we’ll begin our journey of lowering the LLVM IR.