Book Image

Getting Started with LLVM Core Libraries

Book Image

Getting Started with LLVM Core Libraries

Overview of this book

Table of Contents (17 chapters)
Getting Started with LLVM Core Libraries
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 5. The LLVM Intermediate Representation

The LLVM Intermediate Representation (IR) is the backbone that connects frontends and backends, allowing LLVM to parse multiple source languages and generate code to multiple targets. Frontends produce the IR, while backends consume it. The IR is also the point where the majority of LLVM target-independent optimizations takes place. In this chapter, we will cover the following topics:

  • The characteristics of the LLVM IR

  • The LLVM IR language syntax

  • How to write a tool that generates the LLVM IR

  • The LLVM IR pass structure

  • How to write your own IR pass