buildit
llvm-tutor
Our great sponsors
buildit | llvm-tutor | |
---|---|---|
1 | 1 | |
115 | 2,716 | |
0.9% | - | |
7.5 | 6.4 | |
7 days ago | 2 days ago | |
C++ | C++ | |
MIT License | 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.
buildit
-
Build→It: a type based library framework for multi-stage imperative programming
The repository also has other samples which demonstrate code generation besides just loop unrolling. If you look at - https://github.com/BuildIt-lang/buildit/blob/master/samples/sample17.cpp and its corresponding output - https://github.com/BuildIt-lang/buildit/blob/master/samples/outputs/sample17 we have an example where you can write an interpreter for a simple language and BuildIt can turn it into a compiler. While this result is not new, in our opinion we make it considerably easy. Specifically we allow side effects on static variables inside control flow dependent on dynamic expressions. The outcome of this might not be obvious, but this allows you to, for example create nested loops which were not there in the original program but were present in the language input (BrainFuck in this case) that you were trying to interpret.
llvm-tutor
-
What's your salary?
If you want a quick example of something you can do for educational purposes (but would be totally worthless for reality) I'd say go to llvm and implement your own instcombine pass. Follow this tutorial to learn the basics.
What are some alternatives?
verilator - Verilator open-source SystemVerilog simulator and lint system
remill - Library for lifting machine code to LLVM bitcode
miniscript - source code of both C# and C++ implementations of the MiniScript scripting language
clang-tutor - A collection of out-of-tree Clang plugins for teaching and learning
GrayC - GrayC: Greybox Fuzzing of Compilers and Analysers for C
alive2 - Automatic verification of LLVM optimizations
buildit - https://build-it.intimeand.space/ [Moved to: https://github.com/BuildIt-lang/buildit]
mcsema - Framework for lifting x86, amd64, aarch64, sparc32, and sparc64 program binaries to LLVM bitcode
mcc - MicroC example compiler for Stephen Edward's PLT class, but in Haskell
mewa - Compiler-compiler for writing compiler frontends with Lua
expr-ir - An Expression Tree to LLVM-IR Example.
vsop-compiler - Implementation of a VSOP compiler