mlsanityData to 14 Oct 2026

Can Coding Agents Implement Missed Compiler Optimizations? Evaluating LLM Agents on LLVM Peephole Optimizations

arXiv 2607.02684 ↗First posted 2 Jul 2026cs.SEcited by 0

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Coding agents built on large language models are now capable of patching sizable real-world codebases, yet whether they can develop compiler optimizations remains an open question. To study this question, we introduce PeepholeBench, an evaluation framework whose tasks are constructed from real-world missed peephole optimizations reported against LLVM's InstCombine pass. Since missed peephole optimizations are typically fixed with small, localized patches, they offer a well-scoped but demanding testbed for coding agents: a correct fix demands rigorous reasoning about program semantics along with familiarity with optimizer-specific conventions. PeepholeBench derives its tasks from 21 resolved LLVM issues and 19 merged pull requests (PRs), supplies agents with only the issue context that existed before each fix, and assesses the resulting patches for both correctness and profitability. With PeepholeBench, we benchmark state-of-the-art coding agents on fixing missed peephole optimizations in LLVM's InstCombine pass, measuring their patches against the corresponding human-written fixes. We observe a tension between correctness and profitability, and no agent matches human developers on both dimensions at once. The dominant failure modes are overly narrow transformations and misuse of LLVM-specific mechanisms, errors that existing test suites rarely expose. Together, these results establish PeepholeBench as a realistic and challenging benchmark for coding agents, and suggest future directions for building agents that can more dependably assist compiler optimization development.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 18 of its 45 references that are in the map. First posted on arXiv 2 Jul 2026.

Builds on

18 of 45 references.

Closest ancestors · 4

Same direction, newest first

  1. 2026Agentic Harness for Real-World Compilers20 Mar
  2. 2026FeatureBench: Benchmarking Agentic Coding for Complex Feature Development11 Feb
  3. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  4. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 14

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  3. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 585
  4. 2024AutoCodeRover: Autonomous Program Improvementcited by 278
  5. 2025SWE-Lancer: Can Frontier LLMs Earn 1 Million from Real-World Freelance Software Engineering?cited by 105
  6. 2023LLM-in-the-loop: Leveraging Large Language Model for Thematic Analysiscited by 70
  7. 2023Large Language Models for Compiler Optimizationcited by 52
  8. 2024Search-Based LLMs for Code Optimizationcited by 28
  9. 2023RAPGen: An Approach for Fixing Code Inefficiencies in Zero-Shotcited by 14
  10. 2017Souper: A Synthesizing Superoptimizercited by 12
  11. 2024Finding Missed Code Size Optimizations in Compilers using LLMscited by 5
  12. 2025LPO: Discovering Missed Peephole Optimizations with Large Language Modelscited by 4
2 more
  1. 2026Beyond Pass-by-Pass Optimization: Intent-Driven IR Optimization with Large Language Modelscited by 2
  2. 2024Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!cited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Understanding Agent-Based Patching of Compiler Missed Optimizations
  2. 2026Archer: Towards Agentic Review for Compiler Optimizations
  3. 2025Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization
  4. 2025AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework
  5. 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimization
  6. 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization
  7. 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesis
  8. 2026VeRO: A Harness for Agents to Optimize Agents