Fixed strategies
Preset pipelines such as -O2 and -O3 provide strong general-purpose defaults, but may not be ideal for every workload.
NeuroCompiler explores a smarter way to optimize programs: combining machine learning and reinforcement learning to guide LLVM’s optimization decisions around measured execution performance.
Traditional optimization levels apply carefully engineered heuristics. They’re powerful—but the best sequence of transformations can vary with a program’s control flow, memory behavior, loops, and target hardware.
Preset pipelines such as -O2 and -O3 provide strong general-purpose defaults, but may not be ideal for every workload.
Use learned predictions and sequential decision-making to investigate which passes to apply, in what order, and when to stop.
Smaller intermediate representation does not automatically mean faster code. Execution time is the primary objective, with size and compilation overhead kept in view.
The intended architecture keeps LLVM at the center. NeuroCompiler’s decision layer proposes and evaluates optimization choices; benchmark evidence determines whether those choices help.
Source program
+ test inputs
Clang frontend
+ feature extraction
ML predictor
+ RL policy
Selected valid
transformations
Correctness, runtime
+ code size
NOTE This is the intended system architecture. Components are being developed and evaluated in phases; the diagram does not imply that every component is already implemented.
Reliable optimization begins with trustworthy evidence. The roadmap prioritizes reproducible measurements before model complexity and end-to-end integration.
Compile diverse benchmark programs under controlled configurations. Verify correctness and collect repeatable runtime, code-size, and compilation-time measurements.
Train supervised models to estimate optimization outcomes, then investigate an RL policy for choosing useful passes and sequences.
Connect learned decisions to an LLVM-based workflow and compare results against standard optimization levels and ML-only/RL-only variants.
Every experiment should distinguish a promising transformation from a real performance improvement.
Primary objective. Repeated measurements against a documented baseline.
Track binary growth or reduction without treating size as a speed proxy.
Account for feature extraction, inference, search, and optimization time.
Reject invalid outputs and test on programs excluded from training.
Interested in compiler research, benchmarking, collaboration, or learning more about NeuroCompiler? Get in touch.
chirag@neurocompiler.online ↗