Using LLVM's New Pass Manager to Write a Simple Function Pass
Learn how to write and register a simple function pass using LLVM's new Pass Manager, with a complete C++ example, usage notes, and common pitfalls.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to write and register a simple function pass using LLVM's new Pass Manager, with a complete C++ example, usage notes, and common pitfalls.
How LLVM's Global Value Numbering pass decides two computations are the same value, where its correctness boundary with alias analysis lies, and how to verify what it actually did to your IR.
LLVM's new PassManager turns a custom pass into a plain C++ class with one run method. Here's a worked out-of-tree plugin example, how analysis invalidation works, and what porting costs.
A decision guide for adding LTO to a Clang/LLVM build: compare Full LTO and ThinLTO, check constraints and trade-offs, and validate with concrete commands.
Explore how Jule's strong static typing and LLVM integration eliminate runtime overhead and prevent type-related crashes in system-level applications.
Diagnose LLVM AddressSanitizer false positives that appear only at -O2 or higher, with steps to distinguish optimization artifacts from real memory errors.
Learn how to transition from the LLVM Legacy Pass Manager to the New Pass Manager (NPM) to improve IR pipeline efficiency and modularity.
Learn how to adopt LLVM 15+’s New Pass Manager (NPM) to create, register, and execute custom optimization passes. Follow a step‑by‑step guide, verify correctness, and handle fallbacks.
LLVM’s LoopVectorize pass can turn a scalar loop into SIMD code automatically, but only when the analysis deems it safe. This guide walks through the decision process, shows a real example, and explains how to confirm the vectorization on your target.