Beyond Pass-by-Pass Optimization: Intent-Driven IR Optimization with Large Language Models

📅 2026-02-19
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional compilers perform optimization in separate passes without global intent, often yielding suboptimal results. While recent large language model (LLM)-based approaches generate intermediate representation (IR) code end-to-end, they fail to explicitly model optimization intent, compromising both correctness and performance. This work proposes IntOpt, the first IR optimization framework that explicitly decouples high-level optimization intent from low-level transformations. IntOpt structures the optimization process into three stages—intent formulation, refinement, and implementation—integrating program analysis, intent reasoning, and LLM-driven code generation to achieve globally coordinated and structured optimizations. Evaluated on 200 programs, IntOpt achieves a 90.5% verification correctness rate and an average speedup of 2.66×, outperforming state-of-the-art LLM-based optimizers and surpassing -O3 on 37 benchmarks, with a peak speedup of 272.60×.

Technology Category

Application Category

📝 Abstract
Modern compilers optimize programs through a sequence of modular passes over intermediate representations (IR). While this pass-by-pass paradigm offers engineering benefits, it suffers from a pass coordination problem: locally beneficial transformations may block more profitable optimizations in later stages. This limitation stems from the lack of an explicit notion of optimization intent, defined as a holistic strategy for coordinating multiple transformations toward a global performance objective. Recent LLM-based approaches formulate IR optimization as an end-to-end generation task, thereby avoiding the traditional pass-by-pass structure. However, optimization intent remains implicit in these methods, forcing models to jointly infer optimization strategy and generate low-level transformations, which limits both correctness and performance. We propose IntOpt, the first intent-driven IR optimizer that explicitly separates high-level optimization intent from low-level analysis and transformation. IntOpt organizes IR optimization into three stages: intent formulation, intent refinement, and intent realization, enabling globally coordinated transformations. Experiments show that IntOpt achieves 90.5% verified correctness and 2.660x average speedup on 200-program test set, outperforming state-of-the-art LLM-based optimizers in both correctness and performance, and surpassing modern compiler with the -O3 option on 37 benchmarks with speedups of up to 272.60x.
Problem

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

IR optimization
optimization intent
pass coordination
compiler optimization
large language models
Innovation

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

intent-driven optimization
intermediate representation (IR)
large language models
compiler optimization
global coordination
🔎 Similar Papers
No similar papers found.
L
Lei Qiu
SKLP, ICT, CAS, China; UCAS, China
Z
Zi Yang
SKLP, ICT, CAS, China; Jiangnan University, China
F
Fang Lyu
SKLP, ICT, CAS, China
M
Ming Zhong
CUHK, China
H
Huimin Cui
SKLP, ICT, CAS, China; UCAS, China
Xiaobing Feng
Xiaobing Feng
Professor of Institute of Computing Technology, Chinese Academy of Sciecnes
Programming ModelProgramming Analysis and Optimizationg