Does cranelift have some low level docs on how the different passes and subsystems work?
on the level of first we do dce whichh identifies callers and removes dead code
in a case of excellent timing, LWN just published an article on Cranelift today that explains this at a high level: https://lwn.net/SubscriberLink/964735/8b795f23495af1d4/
(not low-level as you asked, but it answers at least the fundamental question of how passes work)
for actually low-level details, @Chris Fallin wrote a blog post going into quite some detail on how the compiler uses ISLE to implement optimization passes: https://cfallin.org/blog/2023/01/20/cranelift-isle/
Perfect..thanks
@Carlo Kok earlier blog posts in that series also go over various bits, and the module-level doc-comments try to be useful too; docs are always a place we could improve though so please do let us know what's confusing or unclear and we can try to fill in the gaps!
Also thanks Till for that link; neat, good PR; but never read the comments, see "Writing a compiler is not a hard problem" :-)
Been tracking this project for years. Love the work you all did. Above wasn't a complaint about the docs more that im really curious about the current architecture after the isle changes. Those blog posts are perfect.
For sure! outside perspectives are also really useful as a signal on doc usefulness so we're definitely open to your thoughts/confusions if any
I've done a basic ir to native code bit in the past. My approach was a lot simpler (but that's fine it was only to see if I could do it. Not for real use.) I love blog posts like this
Last updated: Dec 23 2024 at 12:05 UTC