CtrlK
BlogDocsLog inGet started
Tessl Logo

himank-test/tessl-llvm

LLVM 22.x tile for building compilers, language runtimes, and out-of-tree tooling

88

1.23x
Quality

83%

Does it follow best practices?

Impact

96%

1.23x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

index.mddocs/

tessl-llvm — LLVM 22.x Tile

Audience: Compiler engineers, language implementers, and tooling authors building on LLVM 22.

Version contract: All content in this tile is pinned to LLVM 22.x (specifically the LLVM 22.1.2 release). API signatures, pass names, header paths, and CMake variables reflect LLVM 22 — not LLVM 19/20/21. When in doubt, verify against the LLVM 22 source or LLVM 22 release notes.


How to use this tile

This tile provides three layers of LLVM-specific assistance:

LayerPurposeFiles
DocsOn-demand reference — consult these pages for API details, architecture, and examplesdocs/*.md
Steering rulesAlways-loaded agent guidance — concise rules that shape every LLVM code generation decisionrules/new-programming-language.md
SkillsStep-by-step workflows — invoke a skill to execute a specific LLVM task end-to-endskills/*/SKILL.md

When to use this tile vs upstream docs:

  • Use this tile first for LLVM 22 API signatures, CMake patterns, pass registration, and common workflows.
  • Use official LLVM docs and Doxygen for exhaustive API coverage, rarely-used APIs, and language reference grammar.
  • Use LLVM release notes for the authoritative list of LLVM 22 breaking changes.

Documentation pages

PageWhat it covers
IR Types & ValuesTypes, constants, metadata, IRBuilder patterns
New Pass ManagerNPM architecture, PassBuilder, AnalysisManager, pass pipeline
TableGenTableGen syntax, backends, adding records for registers/instructions/intrinsics
Out-of-Tree ProjectsCMake setup, find_package(LLVM 22), component linking
Code GenerationSelectionDAG, GlobalISel, MachineFunction, TargetMachine
Frontend → IR LoweringAST lowering: expressions, control flow, functions, closures, structs
Debug Info (DWARF)DIBuilder, DISubprogram, DILocalVariable, source locations
ORC JIT v2LLJIT, LLLazyJIT, ThreadSafeModule, symbol resolution, REPL pattern
Exception Handlinginvoke, landingpad, personality functions, cleanup/catch
GC & Statepointsgcroot (legacy), gc.statepoint / gc.relocate, StackMap
Attributes & MetadataFunction/param attributes, loop hints, branch weights, TBAA, !range
Calling ConventionsCallingConv, TableGen CC, CCState / CCValAssign, ABI lowering
LTO & ThinLTOBitcode, full vs thin link, Clang/LLD flags, summaries
Alias AnalysisAliasResult, MemoryLocation, ModRef, TBAA / noalias, custom AA
LLVM 22 Version NotesBreaking changes from LLVM 19/20/21 → 22

Available skills

SkillInvoke when...
add-npm-passAdding a new optimization or analysis pass
out-of-tree-setupStarting a new compiler/tool project against LLVM 22
add-intrinsicAdding a new llvm.* IR intrinsic
version-syncMigrating an existing project to LLVM 22
new-target-backendAdding a new ISA target backend
frontend-to-irLowering an AST to LLVM IR with IRBuilder
add-debug-infoAdding DWARF debug info to a frontend
jit-setupSetting up ORC JIT v2 for a language runtime or REPL
lit-filecheckWriting lit/FileCheck tests for passes, transforms, or codegen
add-calling-conventionDefining or wiring a calling convention (in-tree target or IR-level ABI)
add-exception-handlingAdding try/catch/finally with invoke/landingpad and the Itanium ABI
add-gc-statepointsAdding GC support: shadow-stack (gcroot) or relocating collector (statepoints)
add-attributes-metadataAnnotating IR with nounwind/nocapture, loop hints, TBAA, branch weights
add-ltoEnabling full LTO or ThinLTO for cross-module optimization
add-alias-analysisQuerying AAResults, emitting noalias/TBAA hints, or writing a custom AA pass
add-sanitizerInstrumenting output with ASan, UBSan, or custom runtime checks
add-vectorization-hintGuiding the loop vectorizer and SLP vectorizer via loop metadata
lower-struct-typesLowering structs, unions, tuples, and nested composites to LLVM IR

LLVM 22 at a glance — things that changed

  • Legacy PassManager still present but never use it for new code. Use NPM (PassInfoMixin, FunctionAnalysisManager, etc.) for all passes.
  • Opaque pointers enforced. i8*, i32* etc. are gone — only ptr.
  • llvm::Optional removed. Use std::optional / std::nullopt.
  • Triple.h moved to llvm/TargetParser/Triple.h (old llvm/ADT/Triple.h removed).
  • Intrinsic::getDeclaration() removed — use getOrInsertDeclaration() or getDeclarationIfExists().
  • DbgInstPtr return type on DIBuilder::insertDeclare and insertDbgValueIntrinsic — can be Instruction* or DbgRecord*.
  • C++17 required for all downstream projects.
  • MCJIT removed — use ORC JIT v2 (LLJIT / LLLazyJIT).

See version-notes.md for the full migration reference.


Tile audit

AUDIT.md — gap analysis, full skill inventory, and suggested future additions.


Scope of this tile (v0.5.0)

In scope:

  • IR construction and manipulation (IRBuilder, Module, Function, BasicBlock)
  • New Pass Manager passes and analyses
  • Out-of-tree project setup (CMake, linking)
  • TableGen for registers, instructions, and intrinsics
  • SelectionDAG and GlobalISel codegen basics
  • Calling conventions, LTO/ThinLTO, and alias analysis concepts
  • LLVM 22 migration guidance

Out of scope (v0.1.0):

  • Clang/Flang frontend internals
  • MLIR (separate tile)
  • LLD linker internals
  • Polly / BOLT
  • LLVM 19/18/17 — see version-notes.md for diff; prior version support planned for a later tile release

docs

alias-analysis.md

attributes-metadata.md

calling-conventions.md

codegen.md

debug-info.md

exception-handling.md

frontend-to-ir.md

gc-statepoints.md

index.md

ir-types.md

jit.md

lto.md

new-pass-manager.md

out-of-tree.md

tablegen.md

version-notes.md

AUDIT.md

tile.json