# llir/llvm

Library for interacting with LLVM IR in pure Go.

Repository: https://github.com/llir/llvm
Canonical: https://ross.abutalabs.com/products/llir-llvm
Homepage: https://llir.github.io/document/
Language: Go
License: 0BSD
License Family: permissive
Topics: llvm-ir, go, golang, llvm
Last push: 2024-12-06T18:03:01+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4366, "days_push": 635, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1274, forks 85 (observed 2026-08-28T04:04:12.810580+00:00)

## What it is
A pure Go library for parsing, building, and manipulating LLVM IR without any C bindings or cgo. It provides an asm package for parsing LLVM IR assembly files and an ir package for constructing and operating on IR modules programmatically.

## Use cases
- parse llvm ir assembly files in go
- generate llvm ir from a custom language compiler
- analyze and transform llvm ir modules
- build a compiler backend targeting llvm ir in pure go
- decompile llvm ir to go source
- inspect llvm bitcode-free ir without installing llvm

## When to choose
- you need to work with LLVM IR in Go without compiling LLVM or using cgo
- you are writing a compiler frontend that emits LLVM IR
- you want to parse, analyze, or pretty-print .ll assembly files programmatically

## When to avoid
- you need LLVM's optimization passes or code generation - this library only handles IR representation, not the LLVM toolchain
- you need to parse LLVM bitcode (.bc) binary files rather than textual IR
- you are not working in Go

## Facets
- artifact type: library
- maturity: active
- function: parser, compiler, developer-tools
- domain: compilers, programming-languages, developer-tools
- platform: go, cross-platform
- tags: llvm-ir, pure-go, compiler-infrastructure, ir-manipulation, no-cgo

## Member repositories
- llir/llvm (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:12.810580+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:08.275981+00:00, confidence not recorded.
  - readme: https://github.com/llir/llvm (fetched 2026-08-28T04:04:12.810580+00:00, sha e4d788e4cee0)
  - homepage: https://llir.github.io/document/ (fetched 2026-08-29T12:14:13.289636+00:00, sha cb0c73eb33d1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
