AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning

📄 arXiv: 2606.20373v1 📥 PDF

作者: Zepeng Li, Jie Ren, Zhanyong Tang, Jie Zheng, Zheng Wang

分类: cs.SE, cs.AI

发布日期: 2026-06-18


💡 一句话要点

提出AutoPass以解决编译器性能调优问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 编译器优化 性能调优 大型语言模型 自动调优 微架构

📋 核心要点

  1. 现有方法在运行时性能调优中面临复杂的微架构效应和噪声测量的挑战,难以有效利用大型语言模型。
  2. AutoPass通过开放编译器内部状态给LLM,使其能够基于编译器和运行时证据进行优化决策,提升了调优的灵活性和准确性。
  3. 实验结果表明,AutoPass在x86-64和ARM64平台上分别实现了1.043x和1.117x的性能提升,优于传统的调优方法。

📝 摘要(中文)

大型语言模型(LLMs)在代码编译任务中展现出潜力,但由于复杂的微架构效应和噪声运行测量,应用于运行时性能调优面临挑战。本文提出了AutoPass,一个多代理框架,通过编译器和运行时证据指导LLM生成的优化决策。与以往将编译器视为黑箱的自动调优方案不同,AutoPass使LLM能够查询编译器内部优化状态并分析中间表示,从而协调编译器选项。该过程通过测量的运行时反馈迭代优化配置,以诊断回归并指导延迟改进。AutoPass在推理-only、无训练的环境下运行,无需离线训练或任务特定微调,适用于新基准和平台。我们在LLVM编译器上实现了AutoPass,并在服务器级x86-64和嵌入式ARM64系统上进行了评估。AutoPass在x86-64和ARM64上分别实现了1.043x和1.117x的几何平均加速,超越了专家调优启发式和经典自动调优方法。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在编译器性能调优中的应用难题,现有方法无法有效处理复杂的微架构效应和噪声运行测量。

核心思路:AutoPass通过使LLM能够查询编译器内部状态和分析中间表示,指导优化决策,从而提高调优的准确性和效率。

技术框架:AutoPass的整体架构包括多个代理,利用编译器和运行时证据进行优化决策,采用迭代反馈机制来调整优化配置。

关键创新:AutoPass的主要创新在于将编译器视为可查询的对象,而非黑箱,允许LLM直接访问编译器的内部信息,显著提升了调优的灵活性。

关键设计:AutoPass在设计上不需要离线训练或特定任务微调,能够在推理-only的环境中运行,适应性强,且在LLVM编译器上实现了高效的性能调优。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,AutoPass在x86-64和ARM64平台上分别实现了1.043x和1.117x的几何平均加速,超越了专家调优启发式和传统自动调优方法,展示了其在编译器性能调优中的有效性。

🎯 应用场景

AutoPass的研究成果可广泛应用于编译器优化和性能调优领域,尤其是在需要高效处理复杂微架构的场景中。其灵活的设计使得该方法能够快速适应新平台和基准,具有显著的实际价值和潜在影响。

📄 摘要(原文)

Large Language Models (LLMs) show promise for code compilation tasks, but applying them to runtime performance tuning is difficult due to complex microarchitectural effects and noisy runtime measurements. We present AutoPass, a multi-agent framework for compiler performance tuning that uses compiler and runtime evidence to guide LLM-generated optimization decisions. Rather than treating the compiler as a black box like prior auto-tuning schemes, AutoPass opens up the compiler to the LLM, enabling it to query compiler-internal optimization states and analyze the intermediate representation to orchestrate compiler options. The search process iteratively refines optimization configurations using measured runtime feedback to diagnose regressions and guide latency-improving edits. AutoPass operates in an inference-only, training-free setting and requires no offline training or task-specific fine-tuning, making it readily applicable to new benchmarks and platforms. We implement AutoPass on the LLVM compiler and evaluate it on server-grade x86-64 and embedded ARM64 systems. AutoPass outperforms expert-tuned heuristics and classical autotuning methods, achieving geometric-mean speedups of 1.043x and 1.117x over LLVM -O3 on x86-64 and ARM64, respectively.