Zhang, S., Zhao, J., Yu, Q. et al. (5 more authors) (2026) LEGO-compiler: enhancing neural compilation through translation composability. CCF Transactions on High Performance Computing. ISSN: 2524-4922
Abstract
Large language models (LLMs) have the potential to revolutionize how we design and implement compilers and code translation tools. However, existing LLMs struggle to handle long and complex programs. We introduce LEGO-Compiler, a novel neural compilation system that leverages LLMs to translate high-level languages into assembly code. Our approach centers on three key innovations: LEGO translation, which decomposes the input program into manageable blocks; breaking down the complex compilation process into smaller, simpler verifiable steps by organizing it as a verifiable LLM workflow by external tests; and a feedback mechanism for self-correction. Supported by formal proofs of translation composability, LEGO-Compiler demonstrates high accuracy on multiple datasets, including over 99% on ExeBench and 97.9% on industrial-grade AnsiBench. Additionally, LEGO-Compiler has also achieved a near one order-of-magnitude improvement on compilable code size scalability. This work opens new avenues for applying LLMs to system-level tasks, complementing traditional compiler technologies.
Metadata
| Item Type: | Article |
|---|---|
| Authors/Creators: |
|
| Copyright, Publisher and Additional Information: | This is an author produced version of an article published in CCF Transactions on High Performance Computing, made available via the University of Leeds Research Outputs Policy under the terms of the Creative Commons Attribution License (CC-BY), which permits unrestricted use, distribution and reproduction in any medium, provided the original work is properly cited. |
| Keywords: | Code translation, Neural compilation, Chain of thought, Scalability, In-context learning |
| Dates: |
|
| Institution: | The University of Leeds |
| Academic Units: | The University of Leeds > Faculty of Engineering & Physical Sciences (Leeds) > School of Computing (Leeds) > Distributed Systems & Services |
| Date Deposited: | 30 Jul 2026 08:58 |
| Last Modified: | 30 Jul 2026 13:05 |
| Status: | Published online |
| Publisher: | Springer Nature |
| Identification Number: | 10.1007/s42514-025-00272-9 |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:243239 |
Download
Filename: LLMCompiler_THPC_no_revision.pdf
Licence: CC-BY 4.0

CORE (COnnecting REpositories)
CORE (COnnecting REpositories)