Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn LLVM 17

You're reading from   Learn LLVM 17 A beginner's guide to learning LLVM compiler tools and core libraries with C++

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781837631346
Length 416 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Kai Nacke Kai Nacke
Author Profile Icon Kai Nacke
Kai Nacke
Amy Kwan Amy Kwan
Author Profile Icon Amy Kwan
Amy Kwan
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: The Basics of Compiler Construction with LLVM
2. Chapter 1: Installing LLVM FREE CHAPTER 3. Chapter 2: The Structure of a Compiler 4. Part 2: From Source to Machine Code Generation
5. Chapter 3: Turning the Source File into an Abstract Syntax Tree 6. Chapter 4: Basics of IR Code Generation 7. Chapter 5: IR Generation for High-Level Language Constructs 8. Chapter 6: Advanced IR Generation 9. Chapter 7: Optimizing IR 10. Part 3: Taking LLVM to the Next Level
11. Chapter 8: The TableGen Language 12. Chapter 9: JIT Compilation 13. Chapter 10: Debugging Using LLVM Tools 14. Part 4: Roll Your Own Backend
15. Chapter 11: The Target Description 16. Chapter 12: Instruction Selection 17. Chapter 13: Beyond Instruction Selection 18. Index 19. Other Books You May Enjoy

Compiling LLVM versus installing binaries

You can install LLVM binaries from various sources. If you are using Linux, then your distribution contains the LLVM libraries. Why bother compiling LLVM yourself?

First, not all install packages contain all the files required for developing with LLVM. Compiling and installing LLVM yourself prevents this problem. Another reason stems from the fact that LLVM is highly customizable. With building LLVM, you learn how you can customize LLVM, and this will enable you to diagnose problems that may arise if you bring your LLVM application to another platform. And last, in the third part of this book, you will extend LLVM itself, and for this, you need the skill of building LLVM yourself.

However, it is perfectly fine to avoid compiling LLVM for the first steps. If you want to go on this route, then you only need to install the prerequisites as described in the next section.

Note

Many Linux distributions split LLVM into several packages. Please make sure that you install the development package. For example, on Ubuntu, you need to install the llvm-dev package. Please also make sure that you install LLVM 17. For other versions, the examples in this book may require changes.

You have been reading a chapter from
Learn LLVM 17 - Second Edition
Published in: Jan 2024
Publisher: Packt
ISBN-13: 9781837631346
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime