A LLVM pass that lowers LLVM IR to Brainfuck.
Work in progress -- not all instructions and types are supported yet.
mkdir build && cd build
cmake .. && make
clang -O1 -S -fpass-plugin=./lib/libLLVMBrainfuck.so -o /dev/null ../tests/c/helloworld.c > helloworld.bf
./interpreter/BFInterp helloworld.bf
# For opt, use `-load-pass-plugin`
# opt -load-pass-plugin ./lib/libLLVMBrainfuck.so -disable-output xxx.ll
i8 and conversion are simply ignored.This project is licensed under the MIT License.
See LICENSE for details.
14 commits
C++
92.4%
C
6.4%
A LLVM pass that lowers LLVM IR to Brainfuck.
Work in progress -- not all instructions and types are supported yet.
mkdir build && cd build
cmake .. && make
clang -O1 -S -fpass-plugin=./lib/libLLVMBrainfuck.so -o /dev/null ../tests/c/helloworld.c > helloworld.bf
./interpreter/BFInterp helloworld.bf
# For opt, use `-load-pass-plugin`
# opt -load-pass-plugin ./lib/libLLVMBrainfuck.so -disable-output xxx.ll
i8 and conversion are simply ignored.This project is licensed under the MIT License.
See LICENSE for details.
14 commits
C++
92.4%
C
6.4%