Summary
In this chapter, we presented a general overview of how the LLVM backend works. We saw the different code generator stages and internal instruction representations that change during compilation. We discussed instruction selection, scheduling, register allocation, code emission, and presenting ways for the reader to experiment with these stages by using the LLVM tools. At the end of this chapter, you should be able to read the llc -debug output, which prints a detailed log of the backend activities, and have a good idea about everything that is happening inside the backend. If you are interested in building your own backend, your next step is to refer to the official tutorial at http://llvm.org/docs/WritingAnLLVMBackend.html. If you are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access