Learning how to use TableGen for LLVM backends
LLVM uses the record-oriented language TableGen to describe information used in several compiler stages. For example, in Chapter 4, The Frontend, we briefly discussed how TableGen files (with the .td
extension) are used to describe different diagnostics of the frontend. TableGen was originally written by the LLVM team to help programmers write LLVM backends. Even though the code generator libraries' design emphasizes a clean separation of concerns between target characteristics, for example, using a different class to reflect register information and another for instructions, the backend programmer eventually ends up writing code that reflects the same machine aspect in several different files. The ...
Get Getting Started with LLVM Core Libraries 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.