Agentic Code Optimization via Compiler-LLM Cooperation
Benjamin Mikek, Danylo Vashchilenko, Bryan Lu, Panpan Xu

TL;DR
This paper introduces a multi-agent system that combines traditional compiler optimizations with LLM-based code generation to improve program performance while maintaining correctness, achieving up to 1.25x speedups.
Contribution
It presents a novel cooperative framework integrating compiler passes and LLMs at multiple abstraction levels for optimized code generation.
Findings
Outperforms existing compiler optimizations and LLM baselines.
Achieves up to 1.25x speedup in program execution.
Demonstrates effective distribution of computational resources across abstraction levels.
Abstract
Generating performant executables from high level languages is critical to software performance across a wide range of domains. Modern compilers perform this task by passing code through a series of well-studied optimizations at progressively lower levels of abstraction, but may miss optimization opportunities that require high-level reasoning about a program's purpose. Recent work has proposed using LLMs to fill this gap. While LLMs can achieve large speedups on some programs, they frequently generate code that is incorrect. In this work, we propose a method to balance the correctness of conventional compiler optimizations with the ``creativity'' of LLM-based code generation: compiler-LLM cooperation. Our approach integrates existing compiler optimization passes with LLM-based code generation at multiple levels of abstraction, retaining the best features of both types of code…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
