Cover
Table Of Contents
Copyright
Credits
About the Authors
About the Reviewer
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Quetions
Chapter 1. Playing with LLVM
Modular design and collection of libraries
Getting familiar with LLVM IR
LLVM tools and using in the command line
Summary
Chapter 2. Building LLVM IR
2.1 Creating an LLVM module
2.2 Emitting a function in a module
2.3 Adding a block to a function
2.4 Emitting a global variable
2.5 Emitting a return statement
2.6 Emitting function arguments
2.7 Emitting a simple arithmetic statement in a basic block
2.8 Emitting if-else codition IR
2.9 Emitting LLVM IR for loop
2.10 Summary
Chapter 3. Advanced LLVM IR
3.1 Memory access operations
3.2 Getting the address of an element
3.3 Reading from the memory
3.4 Writting into a memory location
3.5 Inserting a scalar into a vector
3.6 Extracting a scalar from a vector
3.7 Summary
Chapter 4. Basic IR Transformations
4.1 Opt Tool
4.2 Pass and Pass Manager
4.3 Using other Pass into in current Pass
4.4 AnalysisUsage::addRequired<> method
4.5 AnalysisUsage::addRequiredTransitive<> method
4.6 AnalysisUsage::addPreserved<> method
4.7 Instruction simplification example
4.8 Instruction Combining
4.9 Summary
Chapter 5. Advanced IR Block Transformations
5.1 Loop processing
5.2 Scalar evolution
5.3 LLVM intrinsics
5.4 Vectorization
5.5 Summary
Chapter 6. IR to Selection DAG phase
6.1 Converting IR to selectionDAG
6.2 Legalizing SelectionDAG
6.3 Optimizing SelectionDAG
6.4 Instruction Selection
6.5 Scheduling and emitting machine instructions
6.6 Register allocation
6.7 Code Emission
6.8 Summary
Chapter 7. Generating Code for Target Architecture
7.1 Sample backend
7.2 Defining registers and register sets
7.3 Defining the calling convertion
7.4 Defining the instruction set
7.5 Implementing frame lowering
7.6 Lowering instructions
7.7 Printing an instruction
7.8 Summary
Index
A
B
C
E
F
G
I
L
M
N
O
P
R
S
T
V