[Paper Review] ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization
ECCO introduces an evidence-driven, causal reasoning framework that couples an LLM Strategist with a GA Tactician to optimize LLVM phase-ordering, achieving substantial cycle reductions over LLVM -O3 across seven benchmarks.
Compiler auto-tuning faces a dichotomy between traditional black-box search methods, which lack semantic guidance, and recent Large Language Model (LLM) approaches, which often suffer from superficial pattern matching and causal opacity. In this paper, we introduce ECCO, a framework that bridges interpretable reasoning with combinatorial search. We first propose a reverse engineering methodology to construct a Chain-of-Thought dataset, explicitly mapping static code features to verifiable performance evidence. This enables the model to learn the causal logic governing optimization decisions rather than merely imitating sequences. Leveraging this interpretable prior, we design a collaborative inference mechanism where the LLM functions as a strategist, defining optimization intents that dynamically guide the mutation operations of a genetic algorithm. Experimental results on seven datasets demonstrate that ECCO significantly outperforms the LLVM opt -O3 baseline, achieving an average 24.44% reduction in cycles.
Motivation & Objective
- Motivate the need for interpretable, causally-informed compiler auto-tuning beyond black-box search and superficial LLM prompting.
- Propose an evidence-driven pipeline that builds a causal dataset from optimization trajectories and uses rationale distillation to train models.
- Design a collaborative inference framework where an LLM defines optimization intents guiding a genetic algorithm.
- Demonstrate that the approach yields superior cycle reductions on seven benchmark suites compared to strong baselines.
Proposed method
- Build a causal dataset by reverse-engineering high-performance sequences into core passes using iterative pruning (Algorithm 1).
- Extract structural, feature, and performance evidence after each optimization step and identify pass synergies.
- Distill simulated predictive reasoning from privileged evidence into training data so the model learns causal links from static features to outcomes.
- Two-stage policy optimization: supervised fine-tuning (SFT) followed by RL with GRPO to balance format and performance rewards.
- Collaborative Strategist–Tactician inference: an LLM issues high-level optimization intents ( Strategist ) while a GA performs precise mutation-based search ( Tactician ).
- Compute a global prior of pass efficacy (Star Passes) from training data and use an intent-guided probabilistic mutation (Equation 4) to bias GA exploration while preserving ergodicity.

Experimental results
Research questions
- RQ1How does ECCO perform compared with traditional auto-tuning heuristics and direct prompting of LLMs?
- RQ2What is the contribution of evidence-driven training and model scaling to optimization efficacy?
- RQ3Does the collaborative Strategist–Tactician framework improve over purely generative LLM approaches in terms of both performance and interpretability?
- RQ4How faithful are ECCO’s optimization rationales to actual compiler behavior?
Key findings
- ECCO achieves an average 24.44% cycle reduction over LLVM -O3 across seven benchmarks.
- ECCO outperforms traditional search heuristics and direct LLM prompting, with notable gains on cbench, chstone, and mibench.
- Evidence-driven training (CoT and forensic features) is essential; removing evidence or CoT degrades performance.
- Standalone LLM policy converges with Best-of-32 sampling but still lags the full Strategist–Tactician system by about 5 percentage points in average performance.
- Interpretability audits show high fidelity of ECCO’s rationales, with consensus averages around 91% across judges.
- Increasing model size yields diminishing returns without evidence-grounded training; the sweet spot appears around 3B–7B with collaboration.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.