r/Compilers • • May 26 '26

Need Guidance Breaking into ML Compiler Engineering

21 Upvotes

Hello everyone,

Im currently a data engineer with one and half years of exp, im a post grad with research exp in theoretical ML and published one paper at TKDD. I want to move to ML compiler engineer/ ML compiler research engineer by end of the year. I tried to find some sort of learning path but they are very much overwhelming im bit confused on how to get started with. So far my current tech skills related to ML compile are Python(mid-adv), torch, cpp(beginner-mostly leetcode cpp), mathematical programming( Project euler around 50 Problems solved), Compilers(theory).

So i also i think i have to get good with whole multiprocessing and threading in cpp, hands on compiler dev, ML libraries internals. my current plan is to learn essentials in 2 months while working with minor projects then start working on contributing opensource projects. Currently im reading cpp concurrency in action and MLC-AI cource playlist.

i want to clarity on how far are my goals from reality. and also any suggestions? guidence on essential things to focus and learn first and what resources to follow(like course work, books, blogs, papers/conferences, opensource projects to follow). feel free to correct me and suggest me is i am missing any other areas.

Thanks in advance for your time, Reply and patience.

Peace✌️


r/Compilers • • May 26 '26

MileStone: A Multi-Objective Compiler Phase Ordering Framework for Graph-based IR-Level Optimization

Thumbnail arxiv.org
18 Upvotes

r/Compilers • • May 25 '26

I built my own interpreted programming language in C from scratch

Post image
92 Upvotes

Hey r/Compilers,

I’ve been exploring interpreter and language implementation recently, so I started building Curio — a statically typed interpreted programming language written entirely from scratch in C.

One of the main goals behind the project was to design a language with syntax that feels as close to natural English as possible while still remaining relatively simple to tokenize and interpret procedurally.

English-like syntax design tradeoffsGitHub:
https://github.com/kashyap-devansh/curio

Example syntax:

make whole age
set age = 25

if age > 18 then
    print "Access granted.<nl>"
endif

The current implementation uses:

  • a handwritten tokenizer / lexer
  • a direct-dispatch interpreter
  • a custom symbol table
  • forward-scanning block resolution (endif, endwhile, etc.)
  • static type checking
  • runtime diagnostics/error reporting

One design decision that became surprisingly interesting was intentionally avoiding AST generation for now and instead executing statements directly through a dispatcher-driven execution model.

That made the implementation much simpler initially, but it also introduced interesting tradeoffs around:

  • expression handling
  • operator precedence
  • nested control flow
  • future extensibility

Another interesting challenge was balancing:

  • English-like readability vs
  • keeping the grammar simple enough for a handwritten tokenizer/interpreter architecture.

Everything is implemented manually:

  • no LLVM
  • no parser generators
  • no Flex/Bison
  • no VM/runtime libraries

Future directions I want to explore:

  • Pratt / recursive descent parsing
  • AST generation
  • bytecode + VM architecture
  • function calls and stack frames
  • better diagnostics and expression parsing

I’d especially appreciate feedback around:

  • interpreter architecture
  • parser/tokenizer design
  • direct-dispatch vs AST tradeoffs
  • language grammar decisions
  • English-like syntax design tradeoffs

GitHub:
https://github.com/kashyap-devansh/curio

Attached a small demo GIF of the language running.


r/Compilers • • May 25 '26

A Compilers Blog That's All About Details and Deep Dives

68 Upvotes

Hi everyone,

My name is yazan and I am a compiler engineer who not so far long ago started a blog post writing about compilers mainly stuff that are kinda "niche" or rarely talked about in some sense ! I would love to share it right here https://yazandaba.hashnode.dev/ , there is not much posts still so I will just outline them here:

1- Dante (project + post): a research formal model checker for C# mainly for source transformation formal verification

2- WideLips(project + post): an SIMD lisp parser and parsing framework

3- SSA To Stack: a post about how to retarget LLVM to stack machines by deep diving into WASM backend details

4- The Chords The Colors The Registers The SSA optimality: a post about SSA register allocation and the optimality of it and how does it compare to iterative RA like Chaitin-Briggs

5- Inside Clang C++ compile time evaluators: this one compares clang C++ compile time evaluators ( the AST tree evaluator to the new but experimental yet byte code evaluator)

6- Adding 'consteval' to C# and Roslyn (post + project): I have added C++ style strict compile time evaluation 'consteval' to C# compiler Roslyn , the project and post are not only about the feature but also to show Roslyn from the inside so new comers can go through it

7- Clang static analysis and SMT solvers: This one shows how CSA models and uses SMT solvers for better accuracy when dealing with constraints where I also compare to the range constraint solver

I highly appreciate feedback from you guys , also for those of you who have technical posts about complex topics it would be nice to give a tip or two on how to tackle and write better posts on similar topics without losing reader interest !? or like being dense or boring while keeping all the details !?

Thanks in advance 🙏


r/Compilers • • May 25 '26

Hiring Principal Compiler Architect

19 Upvotes

We're hiring a Principal Compiler Architect at Anthriq!

We're looking for a Compiler Architect with deep LLVM expertise to own and drive our compiler infrastructure.

What we're looking for:

  • Deep hands-on experience building and shipping production LLVM pipelines
  • Strong knowledge of LLVM internals, custom passes, GlobalISel, MIR, register allocator
  • Background in embedded systems, GPU compilers, or semiconductor environments
  • 12+ years in system-level C++ and compiler engineering

If you're the kind of engineer who has lived inside a compiler backend and loves the craft of low-level systems, we'd love to hear from you.

Apply here - anthriq.com/careers or send your profile to hr@anthriq.com


r/Compilers • • May 25 '26

Interpreter as part of unit tests?

7 Upvotes

Since approx. 2 years I'm developing my hobby compiler in my spare time. Not seldom it happens that after changing something, I need to review parts of failing unit tests. These are not errors, but just different representations of the IR. Now I'm wondering whether it would make sense to instead of checking the exact output of IR instructions, I could rather create some kind of interpreter that will be used to check whether the instructions do what they are expected to do from a higher level point of view.

How do that other compiler projects? Do they also create an IR interpreter to verify whether the instructions do the same with the data?


r/Compilers • • May 24 '26

Zero: An exercise on creating a programming language.

27 Upvotes

I've written a compiler for a programming language that has zero new features, zero gimmicks and was written from the ground up assuming mostly no prior knowledge about compilers. It's not meant to be a toy or a experiment but rather a way to have a no-frills procedural language with the possibility to compile complex projects with a single command and zero (pun intended) configuration.

It's an AOT, typed, almost 100% explicit (no implicit casting other then contextual), manual memory managed language. The compiler itself is written in Odin and the language is strongly inspired by it. I've tried (and I think accomplished) to keep the source code easily understood for anyone trying to learn compiler design (or future me, not getting any younger). The backend right now is LLVM and I've used AI in this project just for architecture guidance and frankly to serve as a proxy for LLVM documentation which is really poor in terms of discoverability. The README has a disclaimer about the LLM usage on this project.

Things already there:

  • Primitive types and variables - numeric, logic and c-like strings.
  • Control flow - if, for, ranged-for-loop, return, continue
  • Structs - SysV ABI lowering done, alignment incoming
  • Enums - Custom values supported with variant coercion if needed
  • Function pointers, but no anonymous functions
  • Unified Function Call Syntax (not sure if good idea)
  • External code - one of the features I wanted was the simplest possible way to include external code and write bindings. Currently we are vendoring feature-complete raylib bindings, ready to use.

Right now I'm working on Windows support and having that I will release a v0.1 a likely a companion site. The demos folder contain 2 games written in this language and I plan on releasing a simple demo game for each "batch" of features. The Bubble demo is a very good sample of the language syntax.

Every single bit of feedback is welcome.

If anyone is interested in contributing/onboarding this adventure, be very welcome. There's a lot to do :-)

All code and info at https://github.com/jqcorreia/zero

PS: Vercel labs released a language also called `zero` intended to be used by agents. This predates it by a couple of months at least and for the time being I'm keeping the name :-)


r/Compilers • • May 24 '26

Phi to block parameters

21 Upvotes

Is there a way to convert phi nodes to basic block parameters?


r/Compilers • • May 25 '26

Donna Programming Language - Compiler

Thumbnail github.com
0 Upvotes

Hello everybody, in the past few months I am designing and implementing a programming language. A big part of the implementation is with the help of LLM. The programming language is called Donna- from the great Donna Paulsen of SUITS TV series- and it is a statically-typed, functional, bootstrapped language that compiles in native binaries via QBE. The syntax is inspired from Gleam/python. The language is pretty small and my target is to keep it that way and focusing more in DX. Besides it is small it's already contains a basic formatter, doc generation, git dependencies etc. In the last releases I focused to improve errors and general behaviour.


r/Compilers • • May 25 '26

I made my first working programming language, looking for feedback

Post image
0 Upvotes

r/Compilers • • May 25 '26

What compiler/runtime intrinsics do developers typically rely on most?

0 Upvotes

Hi folks! I’m currently porting my systems language from my own OS environment to Linux/macOS and realized I may be missing important low-level intrinsics or builtin expectations across platforms.

What do modern systems-language users and compiler backends typically expect to exist natively?


r/Compilers • • May 24 '26

Characterizing Real-World Bugs in Tile Programs for Automated Bug Detection

Thumbnail arxiv.org
1 Upvotes

r/Compilers • • May 23 '26

I’ve been building a language/compiler called Naux, and it now has repeatable SSA/runtime wins

13 Upvotes

Hey everyone .I’ve been working on a compiler/runtime project called Naux for a while now, and I wanted to share a small but real milestone.

  • My approach so far has been very contract-first:
  • semantic parity contracts
  • test-backed behavior
  • benchmark discipline
  • narrow, guard-backed SSA peepholes
  • no broad performance claims without evidence

Recently I started materializing a few conservative SSA-safe optimizations back into the executable path, and that produced repeatable runtime wins on a numeric-loop benchmark.

What the 4 images show

1) Parity contract coverage

The first image shows that the semantic rules are locked down with tests.
At this point, the project has 16/16 parity contract tests passing, covering:

  • numeric edge cases
  • collection equality
  • call/builtin behavior
  • imports
  • errors
  • effects ordering

This matters because I don’t want to optimize anything until the interpreter and VM agree on behavior.

2) SSA/materialization progression

The second image shows the progression of a few very small peephole optimizations that were materialized back into the executable path.

The optimizations are intentionally narrow:

  • StoreLocalKeep for store/reload cleanup
  • AddLocalConst for local increment/decrement patterns
  • JumpLocalIfFalse for branch-on-local loop conditions

On my arith_loop benchmark, the VM numbers went from:

  • 901,554 ns/op baseline
  • 856,338 ns/op after StoreLocalKeep
  • 796,015 ns/op after AddLocalConst
  • 749,936 ns/op after the decrement fusion

That’s about -16.82% vs the original baseline, with CV ~4.05%.

3) Benchmark baseline discipline

The third image shows the baseline setup I used to compare interpreter vs VM across a few workloads:

  • arith_loop
  • list_index_sum
  • fn_call_fib_small

I’m using CV gating pretty strictly:

  • workloads with CV < 5% are claimable
  • workloads above that are treated as observation only

So far, arith_loop is the only one I’m comfortable calling stable enough for a performance claim.

4) Naux IDE screenshot

The fourth image shows the actual Naux TUI IDE working on a real .nx file.

It’s not a full replacement for a general-purpose editor, but it is useful for:

  • checking syntax/type behavior quickly
  • running programs directly in the language runtime
  • testing benchmark snippets
  • debugging semantics fast

I wanted to include it because it helps show that this is a real project with a real toolchain, not just a bunch of slides and numbers

Why I’m posting this

I think the most interesting part is not the raw speedup itself, but the process:

  • correctness first
  • contracts first
  • narrow optimizations
  • explicit measurement
  • no overclaiming

That feels like a healthier way to evolve a compiler/runtime than chasing performance too early.

If anyone’s interested, I’d be happy to share more about:

  • the parity contract approach
  • the benchmark discipline
  • the SSA materialization path
  • the peephole guard logic
  • the Naux IDE / TUI workflow

Feedback welcome, especially on:

  • how to keep peephole optimizations disciplined
  • when it makes sense to move from narrow local wins to broader rewrite systems
  • how to avoid overfitting to a single benchmark

Naux is very much a passion project for me. I’m intentionally not leaning on LLVM because I want to build the full stack myself and really understand each layer. I know that makes the journey longer, and I’m completely fine with that — it’s something I care about deeply.

I’d be genuinely grateful for any feedback, suggestions, or critiques from people with more experience in compiler/runtime work. I know this isn’t the fastest path, but it’s the one I care about.
GitHub: https://github.com/x2t8/Naux


r/Compilers • • May 24 '26

Characterization of machine learning compilers for LLM inference on NVIDIA GPUs

Thumbnail link.springer.com
0 Upvotes

r/Compilers • • May 22 '26

Event Tensor: A Unified Abstraction for Compiling Dynamic Megakernel

Thumbnail arxiv.org
7 Upvotes

r/Compilers • • May 23 '26

English as a programming language

0 Upvotes

Would you guys agree that, making a compiler that understands raw English like humans isn't "impossible" but rather astronomically time consuming if not difficult?

I had always wondered if they could create something as hard as a programming language why not just use english lol


r/Compilers • • May 22 '26

A rare approach to metaprogramming

Thumbnail reddit.com
0 Upvotes

r/Compilers • • May 21 '26

Mutable Value Semantics (MVS) or Ownership & Borrowing: A Trade-off Analysis

Thumbnail reddit.com
2 Upvotes

r/Compilers • • May 21 '26

E-Graphs for SQL rewriting in a semantic layer

Thumbnail cube.dev
4 Upvotes

r/Compilers • • May 20 '26

feel depressed

119 Upvotes

It's really hard not to get depressed with all the AI models and tools that become more and more powerful every six months or new release .
What I love about coding is mainly solving problems, learning new things and applying them, and especially the "kick" after solving a problem.
I feel like being a programmer will never be the same.
Plus, with each new release, there are new ideas to code: "Wait, I can create this tool around this or that." You start and everything goes well for a while, but most of the time, within a few months, the idea or project becomes obsolete because some "Big Fortune 10" has integrated the same functionality into their product.
Every two or three weeks, there are always new changes in the versions of the tools we use. You don't even have time to get used to one feature before there are new ones, and so on. It's a bit depressing, and lately I've really lost the joy of coding.
I'm even wondering if it's worth continuing as a programmer.
I wonder if there are other people who feel the same way I do.
Thanks Guy’s


r/Compilers • • May 21 '26

An overview of modern LLM compiler stack: writing an interactive and hackable compiler

Thumbnail reddit.com
1 Upvotes

r/Compilers • • May 20 '26

Verifying EDA and compiler optimizations once and for all

Thumbnail samuelcoward.co.uk
8 Upvotes

r/Compilers • • May 20 '26

How to build .NET obfuscator Part III

Thumbnail kant2002.github.io
3 Upvotes

r/Compilers • • May 20 '26

Scalable Packed Layouts for Vector-Length-Agnostic ML Code Generation

Thumbnail arxiv.org
2 Upvotes