Can Large Language Models Understand Intermediate Representations in Compilers?
Not on the map. Why?
Abstract (arXiv)
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, decompilation, code summarization, and execution reasoning. While LLMs exhibit competence in parsing IR syntax and identifying high-level 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 precise instruction-level logic. Our findings highlight the need for IR-specific enhancements in LLM design. We recommend fine-tuning on structured IR datasets and integrating control-flow-sensitive architectures to improve model effectiveness. All experimental data and source code are publicly available at
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 43 of its 81 references that are in the map. First posted on arXiv 7 Feb 2025.
Builds on
43 of 81 references.
References · 43
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
- 2023A Survey of Large Language Modelscited by 2,576
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
31 more
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023StarCoder: may the source be with you!cited by 799
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2020Pre-trained Models for Natural Language Processing: A Surveycited by 505
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2021Pre-Trained Models: Past, Present and Futurecited by 319
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
- 2024CodeGemma: Open Code Models Based on Gemmacited by 150
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2024LLM4Decompile: Decompiling Binary Code with Large Language Modelscited by 39
- 2024Meta Large Language Model Compiler: Foundation Models of Compiler Optimizationcited by 39
- 2023Beyond Accuracy: Evaluating Self-Consistency of Code Large Language Models with IdentityChaincited by 31
- 2024Source Code Summarization in the Era of Large Language Modelscited by 31
- 2023SLaDe: A Portable Small Language Model Decompiler for Optimized Assemblycited by 28
- 2021How could Neural Networks understand Programs?cited by 26
- 2023Refining Decompiled C Code with Large Language Modelscited by 24
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Exploring Code Analysis: Zero-Shot Insights on Syntax and Semantics with LLMscited by 19
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
- 2022Cross-Language Binary-Source Code Matching with Intermediate Representationscited by 13
- 2024Graph Neural Networks for Vulnerability Detection: A Counterfactual Explanationcited by 12
- 2024Can Large Language Models Serve as Evaluators for Code Summarization?cited by 12
- 2022Unveiling Code Pre-Trained Models: Investigating Syntax and Semantics Capacitiescited by 9
- 2023FAIR: Flow Type-Aware Pre-Training of Compiler Intermediate Representationscited by 4
- 2023FASER: Binary Code Similarity Search through the use of Intermediate Representationscited by 4
- 2021A Formal Semantics of the GraalVM Intermediate Representationcited by 1
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2023Large Language Models for Compiler Optimization
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
- 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving
- 2025Chain of Execution Supervision Promotes General Reasoning in Large Language Models
- 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
- 2025Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence
- 2025On Code-Induced Reasoning in LLMs