Home > General > How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler
How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler

How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler

          
5
4
3
2
1

Out of Stock


Premium quality
Premium quality
Bookswagon upholds the quality by delivering untarnished books. Quality, services and satisfaction are everything for us!
Easy Return
Easy return
Not satisfied with this product! Keep it in original condition and packaging to avail easy return policy.
Certified product
Certified product
First impression is the last impression! Address the book’s certification page, ISBN, publisher’s name, copyright page and print quality.
Secure Checkout
Secure checkout
Security at its finest! Login, browse, purchase and pay, every step is safe and secured.
Money back guarantee
Money-back guarantee:
It’s all about customers! For any kind of bad experience with the product, get your actual amount back after returning the product.
On time delivery
On-time delivery
At your doorstep on time! Get this book delivered without any delay.
Notify me when this book is in stock
Add to Wishlist

About the Book

Explore the world of code generation with the LLVM infrastructure, and learn how to extend existing backends or develop your own Key Features Understand the steps involved in generating assembly code from LLVM IR Learn the key constructs needed to leverage LLVM for your hardware or backend Strengthen your understanding with targeted exercises and practical examples in every chapter Purchase of the print or Kindle book includes a free PDF eBook Book DescriptionThe LLVM infrastructure is a popular compiler ecosystem widely used in the tech industry and academia. This technology is crucial for both experienced and aspiring compiler developers looking to make an impact in the field. Written by Quentin Colombet, a veteran LLVM contributor and architect of the GlobalISel framework, this book provides a primer on the main aspects of LLVM, with an emphasis on its backend infrastructure; that is, everything needed to transform the intermediate representation (IR) produced by frontends like Clang into assembly code and object files. You’ll learn how to write an optimizing code generator for a toy backend in LLVM. The chapters will guide you step by step through building this backend while exploring key concepts, such as the ABI, cost model, and register allocation. You’ll also find out how to express these concepts using LLVM's existing infrastructure and how established backends address these challenges. Furthermore, the book features code snippets that demonstrate the actual APIs. By the end of this book, you’ll have gained a deeper understanding of LLVM. The concepts presented are expected to remain stable across different LLVM versions, making this book a reliable quick reference guide for understanding LLVM.What you will learn Understand essential compiler concepts, such as SSA, dominance, and ABI Build and extend LLVM backends for creating custom compiler features Optimize code by manipulating LLVM's Intermediate Representation Contribute effectively to LLVM open-source projects and development Develop debugging skills for LLVM optimizations and passes Grasp how encoding and (dis)assembling work in the context of compilers Utilize LLVM's TableGen DSL for creating custom compiler models Who this book is forThis book is for both beginners to LLVM and experienced LLVM developers. If you’re new to LLVM, it offers a clear, approachable guide to compiler backends, starting with foundational concepts. For seasoned LLVM developers, it dives into less-documented areas such as TableGen, MachineIR, and MC, enabling you to solve complex problems and expand your expertise. Whether you’re starting out or looking to deepen your knowledge, this book has something for you.

Table of Contents:
Table of Contents Building LLVM, Understanding the Directory Structure Compiler Basics and How They Map to LLVM Structures Dealing with the Pass Pipeline TableGen: LLVM's Swiss Army Knife for Modeling Understanding LLVM IR Survey of the Existing Passes Introducing Target-Specific Constructs - Custom Passes, Intrinsic, Cost Model Hands-On Debugging LLVM IR Passes Understanding MachineIR Machine Pass Pipeline - Hypothesis, Optimizations, and Target Hooks Legacy Instruction Selection Framework - SelectionDAG The New Instruction Selection Framework - GlobalISel Instruction Scheduling - Data Dependency Graph and Scheduling Model Register Allocation - Coalescing, Spilling, and Register Assignment Hands-On Debugging MachineIR Passes Understanding MC Building the Assembler - Disassembler Running Analysis on the MC Layer Register Allocation Lowering of the Stack Layout Assembler


Best Sellers


Product Details
  • ISBN-13: 9781835462577
  • Publisher: Packt Publishing Limited
  • Publisher Imprint: Packt Publishing Limited
  • Language: English
  • ISBN-10: 183546257X
  • Publisher Date: 16 May 2025
  • Binding: Digital (delivered electronically)
  • Sub Title: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler


Similar Products

How would you rate your experience shopping for books on Bookswagon?

Add Photo
Add Photo

Customer Reviews

REVIEWS           
Click Here To Be The First to Review this Product
How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler
Packt Publishing Limited -
How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

How to Build an LLVM Backend: A practical guide to engineering your own LLVM-IR-to-assembly-code compiler

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book
    Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!