Learning Branch Probabilities in Compiler from Datacenter Workloads
Easwaran Raman, Xinliang David Li

TL;DR
This paper introduces a machine learning approach to estimate branch probabilities in compilers using datacenter workload data, outperforming heuristics and improving overall program performance.
Contribution
It presents a novel method for learning branch probabilities from large-scale data, enhancing compiler predictions without relying solely on profile-guided information.
Findings
Machine learning model reduces estimation error by 18-50%.
Achieves up to 8.1% performance gains on benchmarks.
Improves search application performance by over 1.2%.
Abstract
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% in comparison to compiler heuristics. This translates to performance improvement of up to 8.1% on 24 out of a suite of 40 benchmarks with a 1% geomean improvement on the suite. This also results in greater than 1.2% performance…
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.
Taxonomy
TopicsCloud Computing and Resource Management · Parallel Computing and Optimization Techniques · Data Stream Mining Techniques
