Compiler Infrastructure
LLVM as reusable middle-end and code generator rather than "a compiler", GCC as the other one, and WebAssembly as a portable sandboxed target.
LLVM is compiler infrastructure: a collection of reusable libraries built around well-specified intermediate representations, with analyses, optimizations and code generators you link into your own program. Clang is one of its clients, not the thing itself.
Language frontend, shared middle-end, target backend — with one intermediate representation at each seam. That factoring turns M languages times N targets into M frontends plus N backends, and it is the reason a new language gets twelve architectures on its first release.
LLVM IR is a typed, SSA-form instruction set that is readable by humans and has three isomorphic forms — text, bitcode and in-memory. Learning to read it turns "the optimizer did something" into a diff you can point at.
Clang is a C, C++ and Objective-C frontend that lowers to LLVM IR — and, unusually, a library whose AST is a supported product in its own right. That second decision is why clang-format, clang-tidy and clangd exist and why they agree with the compiler.
The other mature toolchain, and a genuinely different architecture: GENERIC, then GIMPLE, then RTL, then a target. Three successive intermediate representations where LLVM has one, an extension model based on plugins rather than libraries, and a different licence history.
Compiler, assembler, linker, loader, debugger and build system are six related but distinct programs with different inputs, different outputs and different failure messages. Knowing which one spoke is most of diagnosing a build.
WebAssembly is a target a compiler aims at instead of a machine: source language, compiler, a `.wasm` module, and a runtime that validates it and then executes it — by interpreting, by compiling it on load, or by compiling it ahead of time.
A stack machine with structured control flow, one linear memory, no ambient authority and a validation pass that succeeds or fails in one sweep. Every one of those choices exists so a host can prove things about code it did not write.
One artifact everywhere, a sandbox by construction and microsecond startup, against a measurable performance gap with structural causes: bounds-checked linear memory, no direct system calls, and a feature surface that depends on which proposals the host implements.