
Toolchains
Run LLVM Optimisation Passes by Hand With opt
Run individual LLVM passes such as mem2reg and instcombine on IR with opt, build a pipeline, list the passes and print what each pass changed.
7 min read
Tag
4 posts

Run individual LLVM passes such as mem2reg and instcombine on IR with opt, build a pipeline, list the passes and print what each pass changed.

Write LLVM IR from C with clang -S -emit-llvm, then read types, basic blocks, loads, stores, phi nodes and calls well enough to check what the compiler did.

Follow one C function through Clang, LLVM IR, the optimizer and the code generator, and see what each stage produces and which tool lets you run it alone.

Clang and LLVM from first compile to production: architecture, diagnostics, sanitizers, clangd, clang-tidy, coverage, ThinLTO, cross-compiling and tools.