Old-school trick, new payoff: retargeting JITs by leaning on C compilers

April 7, 2026
High angle of pensive shocked businessman in elegant clothes focusing on screen and interacting with computer while sitting at table near African American female coworker in light spacious office
Photo by Andrea Piacquadio on Pexels

What the paper argues

A 2004 paper titled "Retargeting JIT compilers by using C-compiler generated executable code" revisits a surprisingly pragmatic idea: instead of writing bespoke machine-code backends for each target CPU, emit C (or small C-like fragments), hand them to an off-the-shelf C compiler, and use the resulting native object code as the JIT output. It has been reported that the authors explored this route as a way to piggyback on decades of engineering invested in C compilers — optimizers, code generators, and ABI glue — turning them into a de facto JIT backend. The approach trades off write-once portability for some runtime cost, but the payoff is immediate: support new targets with far less engineering effort.

How they tested it — and what that means

Allegedly, the paper evaluates the technique on concatenative-style languages (think Forth/Joy family) and shows how small compiled snippets can be linked into a running system. The provocative part? You get many of the benefits of a traditional JIT — fast native code, target-specific optimizations — without building a target-specific assembler or register allocator. But it’s not all sunshine: compile latency, toolchain dependencies, and dynamic linking or sandboxing become new headaches. Yes, you’re outsourcing complexity — but you’re also outsourcing constraints.

Why it still matters

This isn’t just academic nostalgia. With modern toolchains like LLVM and lightweight JIT libraries, the landscape has shifted, but the core lesson remains relevant: reuse high-quality, battle-tested tools where possible. The paper’s idea reads like engineering thriftiness: why reinvent a backend when a C compiler will do the heavy lifting? Today’s teams face similar choices — roll your own backend, adopt LLVM, or shim in external compilers at runtime — and the 2004 work offers a useful data point in that trade-off conversation.

Final take

Surprising and a little sly. The paper reminds compiler hackers that elegance sometimes looks like pragmatism: gluing together existing tools can be both clever and effective. Want portability fast? Put C compilers to work. Want minimal runtime fuss? Maybe not. Trade-offs, as always.

Sources: cs.arizona.edu, Lobsters