RAPO: Retrieval-Augmented Phase Ordering
The phase-ordering problem—finding optimal pass sequence—remains NP-hard. While recent RL approaches have shown improved results, they impose heavy per-input search costs. We introduce RAPO, a retrieval-augmented phase-ordering framework that replaces online RL exploration with similarity-based retrieval. Offline, RAPO embeds LLVM IR with IR‑BERT, clusters programs via k-means, and stores each cluster’s representative RL‑discovered pass sequences in a sequence cache. During compilation, a new program is embedded, mapped into its nearest cluster, and optimized by retrieving the cached sequence, thereby transforming “per-program search“ into “similarity-based retrieval.“ RAPO is model-agnostic (compatible with PPO, DQN, and ε-greedy, etc.) and includes lightweight fallbacks for corner cases. RAPO achieves up to ~18.6% of IR instruction count reduction over -Oz, matching or outperforming RL baselines, while reducing phase-ordering search overhead up to ~177x. These results suggest that RAPO delivers near–per‑input quality with deployment‑grade efficiency by transforming online phase ordering into fast, similarity‑driven retrieval.
Mon 15 JunDisplayed time zone: Mountain Time (US & Canada) change
14:00 - 15:20 | Session 1: Advanced Compiler TuningLCTES at Flatirons 3 Chair(s): Myeonggyun Han Kyungpook National University | ||
14:00 10mKeynote | Opening Remarks LCTES Jeronimo Castrillon TU Dresden, Germany | ||
14:10 22mTalk | RAPO: Retrieval-Augmented Phase Ordering LCTES Jinwook Yang Seoul National University, Junghyun Lee Seoul National University, South Korea, Yeonsun Hong Seoul National University, Hyojin Sung Seoul National University DOI | ||
14:32 22mTalk | CausalTuner: Feature-Aware Causal Guidance for Compiler Auto-tuning LCTES Jiaqing Zhong National University of Defense Technology, Juan Chen College of Computer Science and Technology, National University of Defense Technology, China, Yichang Zhou National University of Defense Technology, Kuan Li Dongguan University of Technology DOI | ||
14:54 22mTalk | Empirical Observations about Profile-Guided Optimizations for Mainstream C/C++ Compilers LCTES DOI | ||