Can Large Language Models Recover Semantic Optimization Opportunities That Compilers Miss?
Not on the map. Why?
Abstract (arXiv)
Optimizing compilers miss profitable transformations when their enabling semantics are absent from the analyzed program representation. We ask whether large language models (LLMs) can recover such semantics from heterogeneous C/C++ context and realize them as validated, contract-preserving artifacts. We introduce SeGaBench, an executable benchmark containing 100 synthetic and 20 source-backed cases spanning low-level assumptions, data-structure invariants, and high-level semantic lifting. Each case includes hidden enabling semantics, an oracle artifact, correctness and semantic validators, and a reproducible performance protocol. We evaluate five LLMs using five independent responses per case. The strongest model produces correct artifacts in 94.8% of responses, achieves at least 1.05x speedup in 83.3%, and obtains a performance success on 93.3% of cases. Nevertheless, correct artifacts often close only part of the oracle gap. These results show that LLMs can complement compiler analysis as speculative semantic proposers, provided that their artifacts are validated and evaluated.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 42 references that are in the map. First posted on arXiv 4 Aug 2026.
Builds on
12 of 42 references.
References · 12
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 225
- 2020MLIR: A Compiler Infrastructure for the End of Moore's Lawcited by 65
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2021MLGO: a Machine Learning Guided Compiler Optimizations Frameworkcited by 40
- 2025CUDA-LLM: LLMs Can Write Efficient CUDA Kernelscited by 34
- 2017Souper: A Synthesizing Superoptimizercited by 12
- 2020A Systematic Survey of General Sparse Matrix-Matrix Multiplicationcited by 10
- 2025VecTrans: Enhancing Compiler Auto-Vectorization through LLM-Assisted Code Transformationscited by 4
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Servingcited by 3
- 2023Minotaur: A SIMD-Oriented Synthesizing Superoptimizercited by 2
- 2026HintPilot: LLM-based Compiler Hint Synthesis for Code Optimizationcited by 2
- 2025Concepts for designing modern C++ interfaces for MPIcited by 1
Built on by
Not cited yet.