Chapter 7: Advanced IR Generation
With the intermediate representation (IR) generation introduced in the previous chapters, you can already implement most of the functionality required in a compiler. In this chapter, we will look at some advanced topics that often arise in terms of real-world compilers. For example, many modern languages make use of exception handling, and we look at how to translate this to low-level virtual machine (LLVM) IR.
To support the LLVM optimizer in producing better code in certain situations, we add additional type metadata to the IR code, and attaching debug metadata enables the compiler's user to take advantage of source-level debug tools.
In this chapter, you will learn about the following topics:
- In Throwing ...
Get Learn LLVM 12 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.