arXiv:2606.00131cs.SEcs.AI2026-06被引 1

用AI优化大型程序跨函数代码布局,实测提升0.23%~1.6%性能。

AI-PROPELLER: Warehouse-Scale Interprocedural Code Layout Optimization with AlphaEvolve

  • 通过AI演化生成跨函数代码布局策略,替代传统静态模型。
  • 在真实硬件上测试多种布局方案,获得精确性能反馈。
  • 首次在工业级仓库规模应用中实现细粒度跨函数优化。

链接后优化器(PLOs)如Propeller和BOLT已证明,精准的、基于性能数据的代码布局能从高度优化的二进制文件中获得显著性能提升。然而,这些系统目前仅限于函数内优化,跨函数布局的全局潜力尚未被挖掘。跨函数布局因组合爆炸的搜索空间和复杂的调用-返回语义建模困难而长期受限。因此,细粒度跨函数布局的实际性能潜力仍未验证。AI-PROPELLER采用Magellan智能工作流,将Propeller的编译器启发式规则演化为细粒度跨函数优化器,并微调其策略超参数。为确保高保真度,系统摒弃近似静态开销模型,而是通过智能工作流生成多个布局变体,在真实硬件上执行并测量实际性能计数器,为进化循环提供精确奖励信号。AI-PROPELLER在多个基准测试中评估,包括大型仓库规模应用,实验显示在最先进的FDO和PLO基础上,性能提升达0.23%至1.6%,对真实世界二进制文件具有重要意义。这是首次在工业级仓库规模应用中实现细粒度跨函数代码布局优化。

原文摘要 · Abstract (English)

Post-link optimizers (PLOs) such as Propeller and BOLT have demonstrated that precise, profile-guided code layout can extract significant performance gains from heavily optimized binaries. However, these systems are currently restricted to intraprocedural techniques, leaving the global potential of interprocedural layout largely untapped. Interprocedural code layout is historically difficult due to a combinatorially intractable search space and complex call-return semantics that are challenging to model. Consequently, the performance potential of fine-grained interprocedural layout remains unproven in practice. AI-PROPELLER uses Magellan, an agentic workflow that evolves the compiler heuristic in Propeller into a fine-grained interprocedural optimizer and fine-tunes the resulting policy hyperparameters. To ensure high-fidelity, we move away from approximate static cost models and the agentic workflow generates multiple layout variants that are executed on actual hardware to measure real performance counters, providing a precise reward signal for the evolutionary loop. AI-PROPELLER has been evaluated on several benchmarks including large warehouse-scale applications and experiments show performance improvements of 0.23% to 1.6% optimized with state-of-the-art FDO and PLO which is significant for real-world binaries. This is the first time ever that large warehouse-scale applications in industrial settings have been optimized with fine-grained interprocedural code layout.

代码优化AI编译器性能提升跨函数布局

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。