CIRBench: Evaluating Large Language Models as LLVM IR Optimizers
Zi Yang, Haifeng Ding, Fei Liu, Yingying Cheng, Han Cheng, Zhilei Chai, Haojie Zhou
摘要
Large language models are beginning to introduce a new paradigm for compilation: instead of only assisting at the source level, they can operate directly on intermediate representations (IRs), the compiler’s internal code representation, Early studies suggest that LLM-guided optimization can sometimes rival traditional compiler optimizations on selected programs, but evidence remains fragmented. Yet the community still lacks a rigorous IR-level benchmark that tests whether a model not only understands IR but can rewrite it under compiler-grade semantic constraints with meaningful performance impact. We present CIRBench, a benchmark of 800 curated IR instances spanning four compiler-oriented tracks: Analysis infers IR properties, Repair fixes invalid IR, Refactor applies a single semantics-preserving compiler optimization, and Transform performs performance-oriented rewrites, together mirroring core optimization responsibilities in modern compilers. CIRBench combines verifier, equivalence checking, and end-to-end performance measurement into a unified, layered correctness-aware evaluation of LLMs on IR. On six mainstream LLMs, CIRBench shows that current models fail on many IR analysis and rewriting instances and on median underperform the compiler baseline, but we also observe a maximum speedup of over -O3. These findings highlight both the opportunities and the remaining challenges of using LLMs inside optimizing compilers.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper9
- SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao 等ICLR 2024 · 被引用 2,082 次
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt 等POPL 2021 · 被引用 170 次
- Leveraging Automated Unit Tests for Unsupervised Code TranslationBaptiste Rozière, Jie Zhang, François Charton, Mark Harman 等ICLR 2022 · 被引用 161 次
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler 等ICML 2021 · 被引用 140 次
- Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu 等PLDI 2021 · 被引用 109 次
相关 Paper
- Can Large Language Models Understand Intermediate Representations in Compilers?Hailong Jiang, Jianfeng Zhu, Yao Wan, Bo Fang 等ICML 2025
- QuanBench: Benchmarking Quantum Code Generation with Large Language ModelsXiaoyu Guo, Minggu Wang, Jianjun ZhaoASE 2025 · 被引用 5 次
- Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification InferenceThanh Le-Cong, Bach Le, Toby MurrayACL 2025
- QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly CodeHainan Fang, Yuanbo Wen, Jun Bi, Yihan Wang 等NeurIPS 2025
- EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence CheckingAnjiang Wei, Jiannan Cao, Ran Li, Hongyu Chen 等EMNLP 2025
