arrow
Return

GraalMHC: ML-Based Method-Hotness Classification for Binary-Size Reduction in Optimizing Compilers

delete2026-01-01
delete0
PRE
AI
M
Milan Čugurović *
A
Aleksandar Prokopec
B
Boris Spasojević
V
Vojin Jovanovic
M
Milena Vujošević Janičić
DOI:10.1145/3771775.3786276delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Optimizing compilers often sacrifice binary size in pursuit of higher run-time performance. In the absence of method execution profiles, they uniformly apply performance-oriented optimizations, typically various forms of code duplication. Duplications in methods that are rarely or never executed only increase binary size without improving performance. Modern static profiler use ML to predict branch profiles, yet they do not identify which methods will be frequently executed at run time. Doing so would enable more selective optimizations, reducing binary size while preserving or only minimally affecting run-time performance. We present GraalMHC, a machine-learning-based static profiler that predicts method hotness. GraalMHC uses the XGBoost ensemble to classify methods as cold and warm. For cold methods, GraalMHC enables code-size-reducing optimizations, and for warm methods, it enables performanceimproving optimizations. In this way, GraalMHC enables binary-size reductions with no or minimal impact on runtime performance. In addition, GraalMHC allows users to choose between three different size-optimization levels: (S1) 9-13% binary-size reduction with 1-2% performance loss, (S2) 15-25% reduction with 3-5% performance loss, and (S3) 17-35% reduction with 5-7% performance loss. We integrate GraalMHC into the Oracle GraalVM Native Image compiler, delivering a complete end-to-end solution.
Keywords:
Static Profilers
Optimizing Compilers
Machine Learning
Binary-Size Reduction
GraalVM Native Image

Journal

P
PROCEEDINGS OF THE 35TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, CC 2026
IF:
0
Papers:
18
Citations:
0

Organization

U
university of belgrade
Scholars:
2.7W
Papers: 2.1W
Citations: 25