Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mohitmishra786 avatar

Llvm

  • 634 installs
  • 155 repo stars
  • Updated June 27, 2026
  • mohitmishra786/low-level-dev-skills

LLVM is an Agent Skill that generates, analyzes, and optimizes LLVM IR for developers who build performance-critical compilers, backends, or low-level agent runtimes inside coding agents.

About

LLVM is an Agent Skill from mohitmishra786/low-level-dev-skills focused on LLVM intermediate representation for systems and compiler engineers. The skill helps coding agents produce, inspect, and tune LLVM IR when implementing language backends, JIT pipelines, or low-level runtimes where hand-written assembly is too brittle. Developers reach for LLVM when optimizing hot paths, lowering custom DSLs, or debugging IR-level performance regressions in performance-critical infrastructure. Catalog metadata lists 1 install and rank 3440 on skills.sh, reflecting a niche but specialized low-level development capability rather than general application coding.

  • Generates and transforms LLVM Intermediate Representation
  • Performs static analysis and optimization passes on LLVM bitcode
  • Supports compilation targeting multiple CPU architectures
  • Integrates with Clang and other LLVM toolchain components
  • Enables custom compiler and language runtime development

Llvm by the numbers

  • 634 all-time installs (skills.sh)
  • +28 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #590 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill llvm

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs634
repo stars155
Last updatedJune 27, 2026
Repositorymohitmishra786/low-level-dev-skills

How do you generate and optimize LLVM IR for compilers?

Generate, analyze, and optimize LLVM IR code when building performance-critical backends, compilers, or low-level agent runtimes.

Who is it for?

Systems and compiler engineers working on LLVM-based backends, JIT compilers, or performance-critical low-level runtimes who need IR-level agent assistance.

Skip if: Web application developers who only need high-level framework code without compiler IR or systems-level optimization work.

When should I use this skill?

The user asks to write, analyze, optimize, or debug LLVM IR for compilers, backends, or low-level performance-critical runtimes.

What you get

LLVM IR snippets, optimization passes, and analysis notes for compiler backends or low-level runtimes.

  • LLVM IR modules
  • Optimization pass guidance
  • IR analysis output

By the numbers

  • Lists 1 install on skills.sh catalog metadata
  • Ranked 3440 in the mohitmishra786/low-level-dev-skills collection

Files

SKILL.mdMarkdownGitHub ↗

LLVM IR and Tooling

Purpose

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.

Triggers

  • "Show me the LLVM IR for this function"
  • "How do I run an LLVM optimisation pass?"
  • "What does this LLVM IR instruction mean?"
  • "How do I write a custom LLVM pass?"
  • "Why isn't auto-vectorisation happening in LLVM?"

Workflow

1. Generate LLVM IR

# Emit textual IR (.ll)
clang -O0 -emit-llvm -S src.c -o src.ll

# Emit bitcode (.bc)
clang -O2 -emit-llvm -c src.c -o src.bc

# Disassemble bitcode to text
llvm-dis src.bc -o src.ll

2. Run optimisation passes with opt

# Apply a specific pass
opt -passes='mem2reg,instcombine,simplifycfg' src.ll -S -o out.ll

# Standard optimisation pipelines
opt -passes='default<O2>' src.ll -S -o out.ll
opt -passes='default<O3>' src.ll -S -o out.ll

# List available passes
opt --print-passes 2>&1 | less

# Print IR before and after a pass
opt -passes='instcombine' --print-before=instcombine --print-after=instcombine src.ll -S -o out.ll 2>&1 | less

3. Lower IR to assembly with llc

# Compile IR to object file
llc -filetype=obj src.ll -o src.o

# Compile to assembly
llc -filetype=asm -masm-syntax=intel src.ll -o src.s

# Target a specific CPU
llc -mcpu=skylake -mattr=+avx2 src.ll -o src.s

# Show available targets
llc --version

4. Inspect IR

Key IR constructs to understand:

ConstructMeaning
allocaStack allocation (pre-SSA; mem2reg promotes to registers)
load/storeMemory access
getelementptr (GEP)Pointer arithmetic / field access
phiSSA φ-node: merges values from predecessor blocks
call/invokeFunction call (invoke has exception edges)
icmp/fcmpInteger/float comparison
brBranch (conditional or unconditional)
retReturn
bitcastReinterpret bits (no-op in codegen)
ptrtoint/inttoptrPointer↔integer (avoid where possible)

5. Key passes

PassEffect
mem2regPromote alloca to SSA registers
instcombineInstruction combining / peephole
simplifycfgCFG cleanup, dead block removal
loop-vectorizeAuto-vectorisation
slp-vectorizeSuperword-level parallelism (straight-line vectorisation)
inlineFunction inlining
gvnGlobal value numbering (common subexpression elimination)
licmLoop-invariant code motion
loop-unrollLoop unrolling
argpromotionPromote pointer args to values
sroaScalar Replacement of Aggregates

6. Debugging missed optimisations

# Why was a loop not vectorised?
clang -O2 -Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize src.c

# Dump pass pipeline
clang -O2 -mllvm -debug-pass=Structure src.c -o /dev/null 2>&1 | less

# Print IR after each pass (very verbose)
opt -passes='default<O2>' -print-after-all src.ll -S 2>&1 | less

7. Useful llvm tools

ToolPurpose
llvm-disBitcode → textual IR
llvm-asTextual IR → bitcode
llvm-linkLink multiple bitcode files
llvm-ltoStandalone LTO
llvm-nmSymbols in bitcode/object
llvm-objdumpDisassemble objects
llvm-profdataMerge/show PGO profiles
llvm-covCoverage reporting
llvm-mcaMachine code analyser (throughput/latency)

For binutils equivalents, see skills/binaries/binutils.

Related skills

  • Use skills/compilers/clang for source-level Clang flags
  • Use skills/binaries/linkers-lto for LTO at link time
  • Use skills/profilers/linux-perf combined with llvm-mca for micro-architectural analysis

Related skills

How it compares

Pick the LLVM skill for IR-level compiler and runtime work instead of general refactoring or language-framework skills aimed at application layers.

FAQ

What problems does the LLVM skill solve?

The LLVM skill helps developers generate, analyze, and optimize LLVM IR when building compilers, performance-critical backends, or low-level agent runtimes. It focuses on intermediate representation work rather than high-level application frameworks.

Who should use the LLVM Agent Skill?

The LLVM Agent Skill suits systems and compiler engineers implementing LLVM-based backends or JIT pipelines. Web-only developers without IR or systems programming needs should use higher-level language skills instead.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.