Skip to content

kris-gaudel/mini-brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

11 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

mini-brain

A mini šŸ§ ā—compiler using C++ and LLVM

Goals

  • Learn about LLVM and code generation (IR)
  • Learn basic compiler optimizations (what the LLVM functions are doing under the hood)
  • Get better at C++

Usage

Use generate the mini-brain executable

clang++ -g main.cc `llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native` -O3 -o mini-brain

Running this program should generate the LLVM IR of your BF code in program.bf

To compile the IR to a binary, use

./mini-brain | clang -x ir -

Lastly, run ./a.out to see your program's result!

About

A mini šŸ§ ā—compiler using C++ and LLVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published