Lune

ICML2026顶会

CIRBench: Evaluating Large Language Models as LLVM IR Optimizers

Zi Yang, Haifeng Ding, Fei Liu, Yingying Cheng, Han Cheng, Zhilei Chai, Haojie Zhou

问 Lune

摘要

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 4.96×4.96\times over -O3. These findings highlight both the opportunities and the remaining challenges of using LLMs inside optimizing compilers.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Alive2: bounded translation validation for LLVM 引用了 egg: Fast and extensible equality saturation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper9

  1. SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao 等ICLR 2024 · 2,082 次引用
  2. egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt 等POPL 2021 · 170 次引用
  3. Leveraging Automated Unit Tests for Unsupervised Code TranslationBaptiste Rozière, Jie Zhang, François Charton, Mark Harman 等ICLR 2022 · 161 次引用
  4. 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 次引用
  5. Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu 等PLDI 2021 · 109 次引用

相关 Paper

  1. Can Large Language Models Understand Intermediate Representations in Compilers?Hailong Jiang, Jianfeng Zhu, Yao Wan, Bo Fang 等ICML 2025
  2. QuanBench: Benchmarking Quantum Code Generation with Large Language ModelsXiaoyu Guo, Minggu Wang, Jianjun ZhaoASE 2025 · 5 次引用
  3. LLMs are Brittle to Simple Code Transformations: Introducing CETBench - A Benchmark for Code-Equivalence CheckingNeeva Oza, Ishaan Govil, Parul Gupta, Dinesh Khandelwal 等ACL Findings 2026
  4. Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification InferenceThanh Le-Cong, Bach Le, Toby MurrayACL 2025
  5. QiMeng-NeuComBack: Self-Evolving Translation from IR to Assembly CodeHainan Fang, Yuanbo Wen, Jun Bi, Yihan Wang 等NeurIPS 2025
黄昏的海面,两侧是细线勾勒的悬崖