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

Delving into the LLVM internal design


In order to decouple the compiler into several tools, the LLVM design typically enforces component interaction to happen at a high level of abstraction. It segregates different components into separate libraries; it is written in C++ using object-oriented paradigms and a pluggable pass interface is available, allowing easy integration of transformations and optimizations throughout the compilation pipeline.

Getting to know LLVM's basic libraries

The LLVM and Clang logic is carefully organized into the following libraries:

  • libLLVMCore: This contains all the logic related to the LLVM IR: IR construction (data layout, instructions, basic blocks, and functions) and the IR verifier. It also provides the pass manager.

  • libLLVMAnalysis: This groups several IR analysis passes, such as alias analysis, dependence analysis, constant folding, loop info, memory dependence analysis, and instruction simplify.

  • libLLVMCodeGen: This implements target-independent code generation...