30159

BePilot: An AI Programming Assistant for Compiler Backend Development

Ming Zhong, Xin Sun, Fang Lv, Lulin Wang, Hongna Geng, Lei Qiu, Huimin Cui, Xiaobing Feng
SKLP, Institute of Computing Technology, CAS, China
ACM Transactions on Software Engineering and Methodology, 2025

@article{zhong2025bepilot,

   title={BePilot: An AI Programming Assistant for Compiler Backend Development},

   author={Zhong, Ming and Sun, Xin and Lv, Fang and Wang, Lulin and Geng, Hongna and Qiu, Lei and Cui, Huimin and Feng, Xiaobing},

   journal={ACM Transactions on Software Engineering and Methodology},

   year={2025},

   publisher={ACM New York, NY}

}

Download Download (PDF)   View View   Source Source   

627

views

Compiler backends are tasked with generating executable machine code for various processors. As the diversity of processors continues to grow, it is imperative for programmers to tailor specific compiler backends to accommodate each one. However, compiler backend development remains a labor-intensive and time-consuming process, with limited automation tools available. Although large language models (LLMs) have demonstrated strong abilities in code completion and generation tasks, the lack of appropriate datasets for compiler backend development limits the application of LLMs in this field. this paper, we introduce ComBack++, a multilingual dataset covering C/C++, Machine Description, and TableGen, with 184 backends from GCC and LLVM, four backend-specific tasks. Based on ComBack++, we present BePilot, a compiler backend-specific LLM available in two sizes: BePilot-1.5B and BePilot-7B. We also introduce CB-Retriever, a retriever that constructs few-shot prompts via in-context learning to improve vanilla LLM performance in resource-constrained settings. Experimental results show that BePilot-1.5B and BePilot-7B achieve significantly higher accuracy across four tasks in ComBack++ compared to twelve baseline LLMs (125M – 34B parameters). In addition, CB-Retriever consistently boosts the accuracy of six mainstream LLMs. Both BePilot-1.5B and BePilot-7B, as well as vanilla LLMs augmented with CB-Retriever, outperform the traditional manual compiler backend development approach (Fork-Flow) in efficiency across all four tasks in ComBack++. Furthermore, human evaluation by four experienced compiler backend developers confirms that BePilot not only improves development efficiency over Fork-Flow, but also surpasses commercial AI programming assistants such as GPT-4o-mini and Gemini2-Flash in terms of code quality. These findings confirm that BePilot and CB-Retriever can substantially enhance compiler backend development efficiency.
No votes yet.
Please wait...

You must be logged in to post a comment.

* * *

* * *

HGPU group © 2010-2025 hgpu.org

All rights belong to the respective authors

Contact us: