Lune

ICML2025顶会

Can Large Language Models Understand Intermediate Representations in Compilers?

Hailong Jiang, Jianfeng Zhu, Yao Wan, Bo Fang, Hongyu Zhang, Ruoming Jin, Qiang Guan

摘要

Intermediate Representations (IRs) play a critical role in compiler design and program analysis, yet their comprehension by Large Language Models (LLMs) remains underexplored. In this paper, we present an explorative empirical study evaluating the capabilities of six state-of-the-art LLMs-GPT-4, GPT-3, DeepSeek, Gemma 2, Llama 3, and Code Llama-in understanding IRs. Specifically, we assess model performance across four core tasks: control flow graph reconstruction, IR decompilation, code summarization, and execution reasoning. While LLMs exhibit competence in parsing IR syntax and identifying highlevel structures, they consistently struggle with instruction-level reasoning, especially in control flow reasoning, loop handling, and dynamic execution. Common failure modes include misinterpreting branching instructions, omitting critical operations, and relying on heuristic reasoning rather than on precise instruction-level logic. Our findings highlight the need for IR-specific enhancements in LLM design. We recommend finetuning on structured IR datasets and integrating control-flow-sensitive architectures to improve the models' effectiveness on IR-related tasks. 1

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Generative Agents: Interactive Simulacra of Human Behavior 引用了 Language Models are Few-Shot Learners
  • Generative Agents: Interactive Simulacra of Human Behavior 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper12

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  3. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  4. Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code GenerationJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming ZhangNeurIPS 2023 · 2,317 次引用
  5. Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris 等UIST 2023 · 1,882 次引用

相关 Paper

  1. CIRBench: Evaluating Large Language Models as LLVM IR OptimizersZi Yang, Haifeng Ding, Fei Liu, Yingying Cheng 等ICML 2026
  2. DecLLM: LLM-Augmented Recompilable Decompilation for Enabling Programmatic Use of Decompiled CodeWai Kin Wong, Daoyuan Wu, Huaijin Wang, Zongjie Li 等ISSTA 2025 · 8 次引用
  3. LLM4Decompile: Decompiling Binary Code with Large Language ModelsHanzhuo Tan, Qi Luo, Jing Li, Yuqun ZhangEMNLP 2024 · 31 次引用
  4. Interpretability Analysis of Arithmetic In-Context Learning in Large Language ModelsGregory Polyakov, Christian Hepting, Carsten Eickhoff, Seyed Ali BahrainianEMNLP 2025 · 1 次引用
  5. CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output PredictionJun Gao, Yun Peng, Qian Qiao, Changhai Zhou 等ACL Findings 2026 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖