Reproduce “Exploring the Feasibility of End-to-End Large Language Model as a Compiler” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Hongbin Zhang, Shihao Gao, Yang Liu, Mingjie Xing, Yanjun Wu, Chen Zhao

This research investigates the viability of employing an end-to-end Large Language Model (LLM) as a compiler (LaaC) by designing the CompilerEval framework to benchmark LLM-generated assembly code from C source. The study confirms basic transformation capabilities but reveals low overall success rates, demonstrating that performance improves with increased model scale and the integration of reasoning methods, particularly for simpler RISC architectures.

Key insights

  • Current LLMs possess rudimentary assembly code generation capabilities but exhibit low overall compilation success rates, with compilation (syntactic) errors being the most prevalent issue.
  • Larger model scales (e.g., Llama-405B vs. 70B) and the explicit integration of reasoning methods (e.g., GPT-o1 vs. GPT-4o) significantly improve LLMs' ability to generate correct assembly.
  • LLMs demonstrate cross-platform compilation potential, performing better on Reduced Instruction Set Computing (RISC) architectures like ARM and RISC-V compared to the more complex x86 CISC architecture.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.