Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Learn LLVM 17 - Kai Nacke

Learn LLVM 17

a beginner's guide to learning llvm compiler tools and core libraries with c++

(Autor)

Buch | Softcover
2024 | 2., aktualisierte Auflage
Packt Publishing Limited (Verlag)
978-1-83763-134-6 (ISBN)
CHF 69,80 inkl. MwSt
Learn how to build and use all parts of real-world compilers, including the frontend, optimization pipeline, and a new backend by leveraging the power of LLVM core libraries


Key Features

Get to grips with effectively using LLVM libraries step-by-step
Understand LLVM compiler high-level design and apply the same principles to your own compiler
Add a new backend to target an unsupported CPU architecture

Book DescriptionLLVM was built to bridge the gap between compiler textbooks and actual compiler development. It provides a modular codebase and advanced tools which help developers to build compilers easily. This book provides a practical introduction to LLVM, gradually helping you navigate through complex scenarios with ease when it comes to building and working with compilers.

You'll start by configuring, building, and installing LLVM libraries, tools, and external projects. Next, the book will introduce you to LLVM's design, unraveling its practical applications in each compiler stage: frontend, optimizer, and backend. Using a real programming language subset, you'll build a frontend, generate LLVM IR, optimize it through the pipeline, and generate machine code from it. Advanced chapters cover how to extend LLVM with a new pass, and how to use LLVM tools to debug and raise the quality of your code. You'll also focus on Just-in-Time compilation issues and the current state of JIT-compilation support that LLVM provides, before finally going on to understand how to develop a new backend for LLVM, which introduces you to the target description and how instruction selection works.

By the end of this book, you'll have practical, hands-on experience with the LLVM compiler development framework through real-world examples and source code snippets.What you will learn

Configure, compile, and install the LLVM framework
Understand how the LLVM source is organized
Discover what you need to do to use LLVM in your own projects
Explore how a compiler is structured, and implement a tiny compiler
Generate LLVM IR for common source language constructs
Set up an optimization pipeline and tailor it for your own needs
Extend LLVM with transformation passes and clang tooling
Add new machine instructions and a complete backend

Who this book is forThis book is for compiler developers, enthusiasts, and engineers who are new to LLVM and are interested in learning about the LLVM framework. It is also useful for C++ software engineers looking to use compiler-based tools for code analysis and improvement, as well as casual users of LLVM libraries who want to gain more knowledge of LLVM essentials. Intermediate-level experience with C++ programming is mandatory to understand the concepts covered in this book more effectively.

Kai Nacke is a professional IT architect living in Düsseldorf, Germany. He holds a diploma in computer science from the University of Dortmund. His diploma thesis about universal hash functions was recognized as the best of the semester. He has been with IBM for more than 15 years, and has great experience in the development and architecture of business and enterprise applications. Fascinated by the first home computer, he learned to program a VIC-20 in BASIC. Later, he turned to Turbo PASCAL and Small C on CP/M. Experimenting with the source of Small C created his interest in compiler technology. Many computers, operating systems, and languages followed these first steps. Around 2005, he became interested in the D programming language and created the first fun applications in D. Missing a 64-bit D compiler for Windows, he started to contribute to the LLVM compiler framework and LDC, the LLVM-based D compiler. Soon, he became committer of both projects and is now the current maintainer of LDC. He is also a speaker at the Free and Open Source Software Developers' European Meeting (FOSDEM) and was one of the reviewers of D Cookbook, Packt Publishing.

Table of Contents

Installing LLVM
The structure of a compiler
Turning the source file into an abstract syntax tree
Basics of IR Code Generation
IR generation for high-level language constructs
Advanced IR generation
Optimizing IR
The TableGen language
JIT compilation
Debugging using LLVM tools
The target description
Instruction Selection
Beyond Instruction Selection

Erscheinungsdatum
Zusatzinfo Illustrationen
Verlagsort Birmingham
Sprache englisch
Maße 191 x 235 mm
Einbandart kartoniert
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Theorie / Studium Compilerbau
ISBN-10 1-83763-134-4 / 1837631344
ISBN-13 978-1-83763-134-6 / 9781837631346
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Grundlagen und Anwendungen

von Hanspeter Mössenböck

Buch | Softcover (2024)
dpunkt (Verlag)
CHF 41,85
Effortlessly build cutting-edge C++ code and deliver high-quality …

von Rafał Świdziński

Buch | Softcover (2024)
Packt Publishing Limited (Verlag)
CHF 66,30