NeGate

@negate
39 Followers
11 Following
15 Posts
Working on Cuik+TB (my C compiler and backend)
https://github.com/RealNeGate/Cuik

I'm so many layers into this dev branch I gotta start unwinding my stack, basically just missing:
* Bug fixes
* Finish new builder API
* Bug fixes
* Bug fixes
* Write MIPS tutorial
* :(

What I did:
* Made it easier to describe RA constraints
* Machine SoN
* Optimizer improvements (Loop rotation and tons of peeps)
* Lots of random things

I made an inliner but with no heuristic, i'm a man with no purpose, or a dog with no dog purpose 😔. Yea it just copies graphs but idk where to start on good heuristics, considering a simple node count to start.
Started a few days ago to rewrite my codegen stuff to be more general so I can add more targets quickly, i've gotten x64 to somewhat work again (not complete but enough to prove it's a good design)... Now it's finally time, Aarch64. BTW for anyone who's done ARM work, why does MSVC try to allocate x8 over x0 when given the choice, I dont think it was preserving it for something maybe it's some hardware preference thing?
I've been learning to parse LLVM bitcode, on the left is TB in it's flattened text form and on the right we have the disassembled LLVM bitcode, the goal being to eventually have a drop-in replacement for the llvm tool, llc. Also opens up a lot more stuff to test my backend on.

Inspired by @pervognsen, I too now microblog on gists sometimes:

https://gist.github.com/RealNeGate/904c5bdf95190f271bb0de38f58848dc

This was a proof of concept safepoint polling system that worked in C for windows x64, normal page poking stuff but the idea was to showcase how easy it actually would be to get consistent pausing in userland given you instrument your code like a managed lang might (although no need to track reg+stack state, we're not deopting or anything), idk use it how you will i made green threads with it :)

greenies.c

GitHub Gist: instantly share code, notes, and snippets.

Gist