Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vsl-lang/llir
LLIR: Graph Optimizing LLVM-targetted backend
https://github.com/vsl-lang/llir
backend llvm optimizer vsl
Last synced: 22 days ago
JSON representation
LLIR: Graph Optimizing LLVM-targetted backend
- Host: GitHub
- URL: https://github.com/vsl-lang/llir
- Owner: vsl-lang
- Archived: true
- Created: 2017-08-19T22:28:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-25T01:56:15.000Z (about 7 years ago)
- Last Synced: 2025-01-15T22:32:23.720Z (30 days ago)
- Topics: backend, llvm, optimizer, vsl
- Language: JavaScript
- Homepage: https://staging.vihan.org/LLIR/docs
- Size: 219 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LLIR (vbeta)
LLIR is an optimizing backend which analytically generates probability graphs to
maximize fallthrough contrast between branches. LLIR outputs LLVM and has a
flexible input format so it can be used as a backend for many languages.## Documentation
API documentation can be generated through `npm run docs` and is also [available
online](https://staging.vihan.org/LLIR/docs).### LLIR 101
The LLIR compiler is described in a paper (todo add link). It works around
generating symmetric constraint graphs, all 'functions' having explicit
Domain and Codomain nodes which can be simultaneously constrained.When generating code with LLIR you will generally need to do the following.
1. Choose a model for how your program will be stored in memory. By default
this is `MemoryStore`.
2. Create an `ExecutionGraph` with your memory store.
3. Create a `Subgraph` which contains your side-effect entry & exit points.
LLIR offers LLVM intrinsics so this is not necessary.
4. Populate your `ExecutionGraph`
5. Create a generator (typically `Generator.LL` but you can use a different
type of generator)
6. Create a `Churn` object which will essentially take say how you want to
generate the code. E.g. to a stream, or JIT-friendly formats. Generally
you'd want `AutoChurn` or `StreamChurn`