Jooris Hadeler c2fc83b74b Feat: add LLVM IR backend with opt/llc pipeline
Implements a full LLVM IR text emitter and three-step toolchain:
  1. Emit LLVM IR (.ll) via alloca-based codegen (mem2reg-friendly)
  2. `opt -O2` → optimised IR          (override with FLUXC_OPT)
  3. `llc -filetype=obj` → object file  (override with FLUXC_LLC)
  4. `cc` → link into executable        (override with FLUXC_CC)
     (step 4 skipped in -c mode)

Emitter supports all Flux types, operators, control flow (if/else,
while, loop, break, continue), structs, arrays, pointer operations,
function calls, string literals, and integer literal type inference
via UnboundInt → concrete-type coercion.

Also adds -o <file> CLI flag, exposes CheckResult from the checker
(sigma + phi tables reused by codegen), and updates main.rs to run
the full parse → check → codegen pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 20:21:34 +01:00
Description
No description provided
339 KiB
Languages
Rust 94.7%
Python 5.3%