POSET-RL: Phase ordering for Optimizing Size and Execution Time using Reinforcement Learning
Shalini Jain, Yashas Andaluri, S. VenkataKeerthy, Ramakrishna, Upadrasta

TL;DR
This paper introduces POSET-RL, a reinforcement learning approach to optimize compiler phase ordering, significantly improving code size and execution time across multiple architectures and benchmarks.
Contribution
It presents a novel RL-based method for phase ordering in compilers, using minimal data and two sequence modeling approaches, outperforming fixed heuristic sequences.
Findings
Outperforms heuristic sequences in size and speed by 6.19% and 11.99%.
Effective on x86 and AArch64 architectures with SPEC benchmarks.
Integrates with LLVM for practical deployment.
Abstract
The ever increasing memory requirements of several applications has led to increased demands which might not be met by embedded devices. Constraining the usage of memory in such cases is of paramount importance. It is important that such code size improvements should not have a negative impact on the runtime. Improving the execution time while optimizing for code size is a non-trivial but a significant task. The ordering of standard optimization sequences in modern compilers is fixed, and are heuristically created by the compiler domain experts based on their expertise. However, this ordering is sub-optimal, and does not generalize well across all the cases. We present a reinforcement learning based solution to the phase ordering problem, where the ordering improves both the execution time and code size. We propose two different approaches to model the sequences: one by manual ordering,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
