May 2021
Beginner to intermediate
392 pages
8h 6m
English
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:
Read now
Unlock full access