更新时间:2021-09-03 09:44:25
封面
版权页
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Build and Install LLVM
Understanding LLVM versions
Obtaining prebuilt packages
Building from sources
Summary
Chapter 2. External Projects
Introducing Clang extras
Using the DragonEgg plugin
Chapter 3. Tools and Design
Introducing LLVM's basic design principles and its history
Understanding LLVM today
Interacting with the compiler driver
Using standalone tools
Delving into the LLVM internal design
Writing your first LLVM project
Navigating the LLVM source – general advice
Chapter 4. The Frontend
Introducing Clang
Learning the frontend phases with Clang
Putting it together
Chapter 5. The LLVM Intermediate Representation
Overview
Exercising basic tools to manipulate the IR formats
Introducing the LLVM IR language syntax
Writing a custom LLVM IR generator
Optimizing at the IR level
Chapter 6. The Backend
Learning the backend code structure
Knowing the backend libraries
Learning how to use TableGen for LLVM backends
Understanding the instruction selection phase
Scheduler
Machine instructions
Register allocation
Prologue and epilogue
Understanding the machine code framework
Writing your own machine pass
Chapter 7. The Just-in-Time Compiler
Getting to know the LLVM JIT engine basics
Introducing the llvm::JIT framework
Introducing the llvm::MCJIT framework
Using LLVM JIT compilation tools
Other resources
Chapter 8. Cross-platform Compilation
Comparing GCC and LLVM
Understanding target triples
Preparing your toolchain
Cross-compiling with Clang command-line arguments
Generating a Clang cross-compiler
Testing
Additional resources
Chapter 9. The Clang Static Analyzer
Understanding the role of a static analyzer
Testing the static analyzer
Extending the static analyzer with your own checkers
More resources
Chapter 10. Clang Tools with LibTooling
Generating a compile command database
The clang-tidy tool
Refactoring tools
Writing your own tool
Index