←back to thread

188 points refset | 2 comments | | HN request time: 0.406s | source
1. erichocean ◴[] No.41869461[source]
Maybe this has has already been covered, by I would not target LLVM IR in 2024.

I'd target MLIR (like Mojo does).

1. It's a much easier/better target to work with.

2. It's a strict super-set of LLVM IR.

3. Much better optimizations are possible that are specific to your language.

Separately, I'd love to have a Clojure-friendly interface to MLIR—whether via Jank or something else.

replies(1): >>41871984 #
2. Jeaye ◴[] No.41871984[source]
This is a great suggestion. I've been doing some research on Mojo, but didn't realize MLIR was the recommended approach going forward. I'll look more into this. Codegen is pretty straightforward, from jank's AST, just using LLVM's IRBuilder, so I'd expect migrating to a superset shouldn't be an issue.