Skip to content
ISBN: B0HJSYGT26
ISBN13: 9798174334892

LLVM Backend Development: A Practical Guide to Target Code Generation, Instruction Selection, and Register Allocation

$34.69List Price: $35.99
Save $1.30!
ISBN: B0HJSYGT26
ISBN13: 9798174334892
Formats

Conditions

A brand-new, unused copy in perfect condition.

Formats

Conditions

A brand-new, unused copy in perfect condition.

See all 1 editionsfrom $34.69

Book Overview

Every program you run, every app on your phone, every service in the cloud, eventually becomes raw machine code. Somewhere between your source file and that final binary sits a piece of engineering most developers never touch: the compiler backend. LLVM powers this translation for an enormous share of the software world, and its backend framework is what lets a single compiler infrastructure speak fluently to dozens of wildly different processors. Understanding how that translation actually happens isn't just academic curiosity, it's a skill that opens the door to building your own targets, tuning existing ones, and finally seeing what's really going on beneath every -O2 flag you've ever typed.

Picture this: you're staring at a chunk of assembly your compiler just generated, and you have no idea why it chose those instructions, in that order, using those registers. Somewhere between your code and that output, dozens of invisible decisions were made, decisions about registers, patterns, scheduling, and encoding, each one shaping performance in ways you can't see and can't control.

That gap, between writing code and understanding what actually builds it, is exactly where this book meets you. Chapter by chapter, the fog lifts. Registers stop being mysterious. Instruction selection stops feeling like magic. By the time you reach the final page, you won't just read compiler output, you'll know exactly why it looks the way it does, and you'll have the tools to change it.

What's Inside
  • TableGen from the ground up - registers, instructions, and calling conventions, described the way real LLVM targets describe them
  • The complete instruction selection pipeline - SelectionDAG construction, combining, legalization, pattern matching, and custom lowering
  • GlobalISel, LLVM's newer selection framework, compared honestly against SelectionDAG so you know when to reach for each
  • Register allocation demystified - live intervals, interference, spilling, rematerialization, and coalescing
  • Scheduling and code emission - turning allocated instructions into real, linkable object files
  • A full chapter on assembling, testing, and debugging a complete, working target backend
  • A practical reference appendix: source layout, TableGen cheat sheets, and essential command-line tools
Who It's Meant For

This book is written for:

  • Systems programmers who want to move from using compilers to building them
  • Engineers targeting custom or embedded hardware who need LLVM backend support
  • Anyone curious enough to ask "but how does this actually work?" and refuse to settle for a shallow answer

You don't need prior compiler-internals experience. You do need comfort with C++ and a genuine willingness to sit with complexity until it makes sense.

Every mainstream compiler you rely on hides this exact machinery behind a clean command-line interface. You're about to see behind the curtain. Open Chapter 1, build your first register description, and start turning that invisible black box into something you understand, control, and can build yourself. The backend has been waiting. Turn the page.

Format:
Paperback
Language:
English
ISBN:
B0HJSYGT26
ISBN13:
9798174334892
Release Date:
September 2026
Publisher:
Independently Published
Length:
278 Pages
Weight:
0.98 lbs.
Dimensions:
0.6″ × 6.7″ × 9.6″
ComputersComputers & Technology

Customer Reviews

0 customer ratings | 0 reviews
Write a Review

There are currently no reviews. Be the first to review this work.