qbe-rs
mir
Our great sponsors
- InfluxDB - Access the most powerful time series database as a service
- ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
- CodiumAI - TestGPT | Generating meaningful tests for busy devs
- SonarLint - Clean code begins in your IDE with SonarLint
qbe-rs | mir | |
---|---|---|
23 | 15 | |
45 | 1,821 | |
- | - | |
4.6 | 5.2 | |
5 months ago | about 6 hours ago | |
Rust | C | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
qbe-rs
-
Made my first LLVM front-end… Now what?
You can try buildling you own backend like llvm. A good example or starting point is probably QBE since it is extremely small but very functional.
- Best book on writing an optimizing compiler (inlining, types, abstract interpretation)?
-
Rust port of B3 from WebKit, LLVM-like backend
How big is the whole backend? I've heard that it is small but I wanted to compare it to QBE which is around 8 KLoC and it is quite interesting too.
-
Few lesser known tricks, quirks and features of C
I think QBE might be what you're looking for?
-
Do you consider LLVM a complicated software? And are there any alternatives and how they compare to LLVM?
As far as I know, there is QBE, which is actually kinda underrated, and Cranelift, mainly designed for JIT compilation
Before that, I had spent a bit of time working with QBE, which is much simpler and really easy to write a frontend for. I switched to libgccjit though, because I got frustrated with a few of the things lacking from QBE (like the ability to easily keep track of where different variables live on the stack). I think for many hobby language projects, QBE would be a good option (my project was off the ground very fast using QBE, and I got pretty far before I ran into limitations I couldn't easily work around).
If one of your parameters is size/complexity of the backend and you prefer something smaller, have a look at qbe and cwerg
The alternatives are generally hidden inside of another compiler. The big exception seems to be qbe (https://c9x.me/compile/) however since the author appears to have written this code without peer review, it's not easy to read it's source code.
-
Smallest possible self-hosting zig compiler
So my question is this: if a backend like QBE (~12k Loc) was added to Zig and Zig only had to compile Zig code (no C, etc) for that QBE backend -- about how many LoC would that Zig need to be?
-
Building the fastest Lua interpreter.. automatically
GCC is written in C++ these days, so something like QBE(https://c9x.me/compile/) would be needed.
mir
-
Are Hoistings Possible for C++?
When you say a fork of LLVM, am I correct in assuming that you specifically mean a fork of Clang? I don't see how the compiler backend would affect support for language extensions, regardless of whether it's an exception to that such as Tcc, Cproc, the MIR C jitter, lacc, 8cc, 9cc, and chibicc. Most of those are not for production, excluding Cproc and Tcc (at least according to Suckless or Oasis).
-
Suggestion for a backend?
MIR
- Ask HN: Recommendation for general purpose JIT compiler
- How to learn compilers: LLVM Edition
- What instructions are needed for a language vm
-
Nelua Programming Language
> I wish C was scriptable
C kinda can be used as scripting language with MIR project https://github.com/vnmakarov/mir
It was released just a few days ago, and I've successfully use it as an alternative and fast C compiler with Nelua.
-
What programming languages can emit code?
Like the recently released MIR jit compiler?
- Release The first release of MIR project · vnmakarov/mir
-
A new compiler for Lua and Ravi that can also generate code AOT
The compiler is written in C, and translates input code to an Abstract Syntax Tree. This is then transformed to a linear IR, which is finally translated to C code. The generated C code can be JIT compiled using the MIR backend or compiled ahead-of-time into shared library.
- Cwerg - an opinionated, light-weight compiler backend
What are some alternatives?
LuaJIT - Mirror of the LuaJIT git repository
asmjit - Low-latency machine code generation
Cwerg - A light-weight compiler for a low level language with a reusable backend
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.
terra - Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
lightening
ecl
nelua-lang - Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code.
minivm - A VM That is Dynamic and Fast
gcc-toolchain - A fully-hermetic Bazel GCC toolchain for Linux.
kcs - Scripting in C with JIT(x64)/VM.