A pure Go library for parsing, generating, and analyzing LLVM IR assembly.
llir/llvm is a Go library that provides comprehensive tools for working with LLVM Intermediate Representation (IR). It enables developers to parse existing LLVM IR assembly, generate new IR code programmatically, and perform analysis on IR modules, all within the Go ecosystem. The library offers a pure Go implementation without external LLVM dependencies, making it portable and easy to integrate into Go applications.
Go developers who need to interact with LLVM IR, such as those building compilers, decompilers, static analyzers, or other compiler toolchain components in Go. It is also suitable for researchers or educators working with LLVM IR in a Go environment.
Developers choose llir/llvm because it provides a clean, idiomatic Go interface for LLVM IR, eliminating the need for external C++ libraries and simplifying integration into Go projects. Its pure Go implementation ensures portability and ease of use, while tracking official LLVM releases ensures compatibility with LLVM versions 9.0 through 15.0.
Library for interacting with LLVM IR in pure Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
No external LLVM dependencies, making it easy to install with 'go get' and integrate into Go projects without CGO or cross-compilation issues.
Supports parsing, generating, and analyzing LLVM IR, as shown in examples for callgraph generation and programmatic code output.
Provides a clean, Go-native interface that simplifies working with LLVM IR structures, unlike low-level C++ bindings.
Tracks official LLVM releases from versions 9.0 to 15.0, ensuring compatibility with a wide range of IR formats, though with some delay.
Focuses solely on IR manipulation without capabilities for running LLVM optimizations or JIT compilation, limiting it to pre- or post-processing tasks.
As noted in the README, support for LLVM 15.0 is 'yet to be released,' indicating delays in syncing with upstream LLVM releases.
While basic analysis like callgraph is supported, more complex LLVM functionalities such as full optimization pipelines or advanced analyses are not implemented.