paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Training Large Language Models to Comprehend LLVM IR via Feedback-Driven Optimization

通过反馈驱动的优化训练大语言模型理解 LLVM IR
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 4/10 · 论文涉及 LLVM IR、编译优化与 LLM 辅助代码分析,属于 PL 与 AI 交叉,可能对 AI→PL 方向有间接启发;但其核心是训练 LLM 理解/优化 IR,研究目标本身是提升 LLM 能力,而非将静态分析用于 ML/Agentic 程序,也未涉及浮点程序分析、贝叶斯程序分析或形式化验证,因此匹配度有限。引用 0 inbox
Yifan Zhang, Kevin Leach
crossref: 2026-09-12

AI 速览

一句话:提出融合多种编译器优化反馈(静态监督与基于偏好的交互式精炼)来训练 LLM 理解并优化 LLVM IR 的框架。

LLVM IR 是源代码与机器码之间的关键桥梁,但其复杂性给人类开发者与 AI 分析工具都带来挑战。现有方法往往依赖单一优化策略(如 -Oz)来指导模型。本文提出一种训练框架,让大语言模型通过多样化的优化反馈来更好地理解与优化 LLVM IR:一是利用编译器定义的各种优化 pass 提供静态监督;二是引入交互式、基于偏好的反馈驱动精炼学习(可能采用强化学习)。这种双重反馈机制旨在使 LLM 能更有效地处理与分析 LLVM IR,从而支撑代码摘要、优化建议与漏洞检测等下游软件工程任务。论文主要阐述方法设计与动机,评估方式为面向上述下游任务的验证。

问题
LLVM IR 结构复杂,现有基于单一优化策略(如 -Oz)训练的 LLM 难以充分理解与优化它,进而影响代码摘要、优化推荐与漏洞检测等下游任务。
方法
结合两类反馈训练 LLM:来自多种编译器优化 pass 的静态监督,以及基于偏好的交互式、反馈驱动精炼学习(可能使用强化学习)。
评估
通过下游软件工程任务(代码摘要、优化建议、漏洞检测)来检验模型对 LLVM IR 的理解与优化能力。
原文摘要(Abstract)

LLVM Intermediate Representation (LLVM IR) serves as a crucial bridge between source code and machine code, yet its complexity presents challenges for both human developers and AI-driven analysis tools. We propose an approach to train Large Language Models (LLMs) to better comprehend and optimize LLVM IR by leveraging diverse optimization feedback. Instead of relying on a single optimization strategy like -Oz, our framework incorporates multiple types of optimizations, combining (1) static supervision from various compiler-defined passes with (2) interactive, feedback-driven refinement learning based on preferences (potentially using reinforcement learning). This dual-feedback mechanism is designed to enable LLMs to process and analyze LLVM IR more effectively, thereby facilitating downstream software engineering tasks such as code summarization, optimization recommendation, and vulnerability detection.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot9109,
  title = {Training Large Language Models to Comprehend LLVM IR via Feedback-Driven Optimization},
  author = {Yifan Zhang and Kevin Leach},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3731662}
}