Exploring the Feasibility of End-to-End Large Language Model as a Compiler
Hongbin Zhang, Shihao Gao, Yang Liu, Mingjie Xing, Yanjun Wu, Chen Zhao

TL;DR
This paper investigates the potential of large language models to function as end-to-end compilers, evaluating their current capabilities, limitations, and future improvements for code translation tasks.
Contribution
It introduces the CompilerEval dataset and framework to assess LLMs as compilers, highlighting their basic abilities and proposing methods to enhance their performance.
Findings
LLMs show basic compilation capabilities but have low success rates.
Prompt optimization and model scaling improve code quality.
Future research can enable LLMs to generate high-quality assembly code.
Abstract
In recent years, end-to-end Large Language Model (LLM) technology has shown substantial advantages across various domains. As critical system software and infrastructure, compilers are responsible for transforming source code into target code. While LLMs have been leveraged to assist in compiler development and maintenance, their potential as an end-to-end compiler remains largely unexplored. This paper explores the feasibility of LLM as a Compiler (LaaC) and its future directions. We designed the CompilerEval dataset and framework specifically to evaluate the capabilities of mainstream LLMs in source code comprehension and assembly code generation. In the evaluation, we analyzed various errors, explored multiple methods to improve LLM-generated code, and evaluated cross-platform compilation capabilities. Experimental results demonstrate that LLMs exhibit basic capabilities as compilers…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Natural Language Processing Techniques · Topic Modeling
