Learning Branch Probabilities in Compiler from Datacenter Workloads

02/10/2022
by   Easwaran Raman, et al.
0

Estimating the probability with which a conditional branch instruction is taken is an important analysis that enables many optimizations in modern compilers. When using Profile Guided Optimizations (PGO), compilers are able to make a good estimation of the branch probabilities. In the absence of profile information, compilers resort to using heuristics for this purpose. In this work, we propose learning branch probabilities from a large corpus of data obtained from datacenter workloads. Using metrics including Root Mean Squared Error, Mean Absolute Error and cross-entropy, we show that the machine learning model improves branch probability estimation by 18-50 translates to performance improvement of up to 8.1 benchmarks with a 1 greater than 1.2

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset