Learn LLVM 12 : A beginner's guide to learning LLVM compiler tools and core libraries with C++ (Paperback)

Nacke, Kai

買這商品的人也買了...

相關主題

商品描述

LLVM 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 design and how it works in practice during each LLVM compiler stage: frontend, optimizer, and backend. Using a subset of a real programming language as an example, you will then learn how to develop a frontend and generate LLVM IR, hand it over to the optimization pipeline, and generate machine code from it. Later chapters will show you how to extend LLVM with a new pass and how instruction selection in LLVM works. 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.

By the end of this LLVM book, you will have gained real-world experience in working with the LLVM compiler development framework with the help of hands-on examples and source code snippets.

商品描述(中文翻譯)

LLVM是為了彌補編譯器教科書和實際編譯器開發之間的差距而建立的。它提供了一個模塊化的代碼庫和先進的工具,幫助開發人員輕鬆構建編譯器。本書提供了對LLVM的實用介紹,逐步幫助您在構建和使用編譯器時輕鬆應對複雜情境。

您將從配置、構建和安裝LLVM庫、工具和外部項目開始。接下來,本書將介紹LLVM的設計以及在每個LLVM編譯器階段(前端、優化器和後端)中的實際運作方式。通過使用一個真實編程語言的子集作為示例,您將學習如何開發前端並生成LLVM IR,將其交給優化流水線,並從中生成機器代碼。後面的章節將向您展示如何通過新的pass擴展LLVM以及LLVM中的指令選擇是如何工作的。您還將專注於即時編譯問題以及LLVM提供的即時編譯支持的當前狀態,最後了解如何為LLVM開發新的後端。

通過閱讀本書,您將通過實際示例和源代碼片段獲得在使用LLVM編譯器開發框架方面的實際經驗。