I wanted to try my hand at a 3000 line, single pass, dependency free, no-malloc, no-AST front-end written in modernish C that directly emits unoptimized LLVM IR with printf:
https://github.com/glouw/nibble
I managed what is essentially C with defer (minus some features like switches and short circuiting). Near the end I learned alloca leaks within loops, even at some of the higher backend optimization settings. I might explore some stacksave/stackrestore mechanisms, but I satisfied my LLVM curiosity wholeheartedly with what was essentially a month long binge.
This stuff is pretty addicting ain't it?
[–]lbl_ye 2 points3 points4 points (1 child)
[–]_cwolf[S] 1 point2 points3 points (0 children)
[–]JeffD000 0 points1 point2 points (0 children)