Guide agents through the LLVM IR pipeline: generating IR, running optimisation passes with opt, lowering to assembly with llc, and inspecting IR for debugging or performance work.
| alloca | Stack allocation (pre-SSA; mem2reg promotes to registers) | | load/store | Memory access | | getelementptr (GEP) | Pointer arithmetic / field access | | phi | SSA φ-node: merges values from predecessor blocks | | call/invoke | Function call (invoke has exception edges) | | icmp/fcmp | Integer/float comparison |
| br | Branch (conditional or unconditional) | | ret | Return | | bitcast | Reinterpret bits (no-op in codegen) | | ptrtoint/inttoptr | Pointer↔integer (avoid where possible) |
LLVM IR and pass pipeline skill. Use when working directly with LLVM Intermediate Representation (IR), running opt passes, generating IR with llc, inspecting or writing LLVM IR for custom passes, or understanding how the LLVM backend lowers IR to assembly. Activates on queries about LLVM IR, opt, llc, llvm-dis, LLVM passes, IR transformations, or building LLVM-based tools. Source: mohitmishra786/low-level-dev-skills.