logo资料库

LLVM_Essentials.pdf

第1页 / 共236页
第2页 / 共236页
第3页 / 共236页
第4页 / 共236页
第5页 / 共236页
第6页 / 共236页
第7页 / 共236页
第8页 / 共236页
资料共236页,剩余部分请下载后查看
LLVM Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
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
Questions
1. Playing with LLVM
Modular design and collection of libraries
Getting familiar with LLVM IR
LLVM tools and using them in the command line
Summary
2. Building LLVM IR
Creating an LLVM module
Emitting a function in a module
Adding a block to a function
Emitting a global variable
Emitting a return statement
Emitting function arguments
Emitting a simple arithmetic statement in a basic block
Emitting if-else condition IR
Emitting LLVM IR for loop
Summary
3. Advanced LLVM IR
Memory access operations
Getting the address of an element
Reading from the memory
Writing into a memory location
Inserting a scalar into a vector
Extracting a scalar from a vector
Summary
4. Basic IR Transformations
Opt Tool
Pass and Pass Manager
Using other Pass info in current Pass
AnalysisUsage::addRequired<> method
AnalysisUsage:addRequiredTransitive<> method
AnalysisUsage::addPreserved<> method
Instruction simplification example
Instruction Combining
Summary
5. Advanced IR Block Transformations
Loop processing
Scalar evolution
LLVM intrinsics
Vectorization
Summary
6. IR to Selection DAG phase
Converting IR to selectionDAG
Legalizing SelectionDAG
Optimizing SelectionDAG
Instruction Selection
Scheduling and emitting machine instructions
Register allocation
Code Emission
Summary
7. Generating Code for Target Architecture
Sample backend
Defining registers and register sets
Defining the calling convention
Defining the instruction set
Implementing frame lowering
Lowering instructions
Printing an instruction
Summary
Index
LLVM Essentials
Table of Contents LLVM Essentials Credits About the Authors About the Reviewer www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders 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 Questions 1. Playing with LLVM Modular design and collection of libraries Getting familiar with LLVM IR LLVM tools and using them in the command line Summary 2. Building LLVM IR Creating an LLVM module Emitting a function in a module Adding a block to a function Emitting a global variable
Emitting a return statement Emitting function arguments Emitting a simple arithmetic statement in a basic block Emitting if-else condition IR Emitting LLVM IR for loop Summary 3. Advanced LLVM IR Memory access operations Getting the address of an element Reading from the memory Writing into a memory location Inserting a scalar into a vector Extracting a scalar from a vector Summary 4. Basic IR Transformations Opt Tool Pass and Pass Manager Using other Pass info in current Pass AnalysisUsage::addRequired<> method AnalysisUsage:addRequiredTransitive<> method AnalysisUsage::addPreserved<> method Instruction simplification example Instruction Combining Summary 5. Advanced IR Block Transformations Loop processing Scalar evolution LLVM intrinsics Vectorization Summary 6. IR to Selection DAG phase
Converting IR to selectionDAG Legalizing SelectionDAG Optimizing SelectionDAG Instruction Selection Scheduling and emitting machine instructions Register allocation Code Emission Summary 7. Generating Code for Target Architecture Sample backend Defining registers and register sets Defining the calling convention Defining the instruction set Implementing frame lowering Lowering instructions Printing an instruction Summary Index
LLVM Essentials
分享到:
收藏