We will be presenting at LATTE in a couple of weeks during ASPLOS in Pittsburgh! Our talk will be on our ongoing work on porting the @ClashHDL compiler to CIRCT. It's a super fun project where we get to explore some neat optimizations and cool IR design. If you're interested in learning more about it you can read our short LATTE paper here:
https://www.cs.princeton.edu/~ad4048/pdfs/latte-2026-submission-14.pdf
@miado Cool work! The dialect reminds me a bit of this: https://arxiv.org/pdf/2201.07272 Though you obviously have a very different compilation target 😃
@miado I don't think they actually preserve ADTs (?), so its also obviously different in that way.

@CanLehmann hmmm interesting, thanks for the pointer! Glancing at it, it seems quite interesting but also like they're trying to encode a different set of constructs, and don't seem to mention recursion or adts anywhere, so it's unclear how it could model something like Haskell?

There are a couple of dialects that attempted to encode something close to lambda calculus in mlir, most notable one that actually partially upstreamed is `rise`, but they tended to not want to deal with recursion of higher order functions and their design was really focused around making it easier to target llvm ir, so that's why we opted for making a more recursion focused, hardware oriented one.

It's a very fun space to work it because so many people have different views of what is important to keep in the ir to make the lowering easier, I'm excited to see how much we'll have to change `lc` when we try to upstream it 😅

@miado I am sadly not very familiar with their work either, it just came to mind while reading through your paper. There is a talk about it here https://www.youtube.com/watch?v=cyMQbZ0B84Q

They mention algebraic data types at 7:00, but don't expand on it. Maybe we would have to look at the code to find out how they handle this. I get the feeling that they are somewhat lower level than your IR though. So in that way it probably mirrors what you say about existing dialects mainly targeting LLVM.

2022 LLVM Dev Mtg: MLIR for Functional Programming

YouTube

@miado It would be really cool to be able to lower to both LLVM and CIRCT Core dialects from a single lambda calculus IR though.

I am not involved with CIRCT though, the last time I experimented with it it still seemed a bit too early for my applications, so 🤷

@CanLehmann I mean there's already an existing pipeline that goes from the core dialects to LLVM IR through arcilator, so in theory this dialect can be used for that too, and as I briefly mentioned in the paper, `lc` can also very much be used to encode software, so if someone wants to they could pretty straightforwardly write a direct lowering to LLVM IR