Saved in:
Bibliographic Details
Main Authors: Zhang, Hongbin, Gao, Shihao, Liu, Yang, Xing, Mingjie, Wu, Yanjun, Zhao, Chen
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2511.04132
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911251207028736
author Zhang, Hongbin
Gao, Shihao
Liu, Yang
Xing, Mingjie
Wu, Yanjun
Zhao, Chen
author_facet Zhang, Hongbin
Gao, Shihao
Liu, Yang
Xing, Mingjie
Wu, Yanjun
Zhao, Chen
contents 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 but currently achieve low compilation success rates. By optimizing prompts, scaling up the model, and incorporating reasoning methods, the quality of assembly code generated by LLMs can be significantly enhanced. Based on these findings, we maintain an optimistic outlook for LaaC and propose practical architectural designs and future research directions. We believe that with targeted training, knowledge-rich prompts, and specialized infrastructure, LaaC has the potential to generate high-quality assembly code and drive a paradigm shift in the field of compilation.
format Preprint
id arxiv_https___arxiv_org_abs_2511_04132
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Exploring the Feasibility of End-to-End Large Language Model as a Compiler
Zhang, Hongbin
Gao, Shihao
Liu, Yang
Xing, Mingjie
Wu, Yanjun
Zhao, Chen
Machine Learning
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 but currently achieve low compilation success rates. By optimizing prompts, scaling up the model, and incorporating reasoning methods, the quality of assembly code generated by LLMs can be significantly enhanced. Based on these findings, we maintain an optimistic outlook for LaaC and propose practical architectural designs and future research directions. We believe that with targeted training, knowledge-rich prompts, and specialized infrastructure, LaaC has the potential to generate high-quality assembly code and drive a paradigm shift in the field of compilation.
title Exploring the Feasibility of End-to-End Large Language Model as a Compiler
topic Machine Learning
url https://arxiv.org/abs/2511.04132