AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework

📅 2025-10-12
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses three key challenges in compiler auto-optimization: misalignment between program representations and optimization semantics, inefficient agent-environment interaction, and sparse reward signals. Methodologically, we propose a knowledge- and data-coordinated intelligent compilation optimization framework: (1) constructing a structured program knowledge graph and a high-quality optimization trajectory dataset; (2) designing a knowledge-guided, adaptive pass-sequence generation mechanism; and (3) integrating large language models, static analysis, reinforcement learning, and supervised fine-tuning into a context-aware hybrid training paradigm. Our contribution is the first semantic-aligned compiler optimization agent architecture, achieving an average 12.7% performance improvement and 43% reduction in optimization time on LLVM standard benchmarks—significantly outperforming state-of-the-art methods. The implementation is publicly available.

Technology Category

Application Category

📝 Abstract
Compiler optimization is crucial for enhancing program performance by transforming the sequence of optimization passes while maintaining correctness. Despite the promising potential of large language models (LLMs)-based agent for software optimization, automating compiler optimization remains challenging due to: (1) semantic misalignment between abstract program representations and concrete optimization passes, (2) inefficient interaction mechanisms between agents and compiler environments, and (3) reward sparsity from the extensive decision-making process within large optimization spaces. This paper introduces extbf{AwareCompiler}, an agentic framework for compiler optimization that addresses these challenges through three key innovations: structured knowledge integration and dataset construction, knowledge-driven adaptive pass generation, and data-driven hybrid training pipeline. Experimental results on standard benchmarks demonstrate that AwareCompiler significantly outperforms existing baselines in both performance and efficiency, highlighting the effectiveness of our synergistic knowledge-data-driven approach. Our code is publicly available at https://github.com/LHY-24/AwareCompiler.
Problem

Research questions and friction points this paper is trying to address.

Addressing semantic misalignment between program representations and optimization passes
Improving agent-compiler interaction mechanisms for efficient optimization
Mitigating reward sparsity in large compiler optimization decision spaces
Innovation

Methods, ideas, or system contributions that make the work stand out.

Structured knowledge integration for dataset construction
Knowledge-driven adaptive pass generation method
Data-driven hybrid training pipeline for optimization
🔎 Similar Papers
No similar papers found.
H
Hongyu Lin
University of Chinese Academy of Sciences, China
Haolin Pan
Haolin Pan
Institute of Software Chinese Academy of Sciences
AI for CompilerSIMD OptimizationCompiler Technology
Haoran Luo
Haoran Luo
Nanyang Technological University
Knowledge GraphLarge Language ModelsGraph Neural Networks
Y
Yuchen Li
University of Chinese Academy of Sciences, China
Kaichun Yao
Kaichun Yao
Institute of Software, Chinese Academy of Sciences
Natural Language ProcessingData Mining
L
Libo Zhang
Institute of Software Chinese Academy of Sciences, China
M
Mingjie Xing
Institute of Software Chinese Academy of Sciences, China
Yanjun Wu
Yanjun Wu
Institute of Software, Chinese Academy of Sciences
Computer Science