Profile Guided Optimization without Profiles: A Machine Learning Approach

12/24/2021
by   Nadav Rotem, et al.
7

Profile guided optimization is an effective technique for improving the optimization ability of compilers based on dynamic behavior, but collecting profile data is expensive, cumbersome, and requires regular updating to remain fresh. We present a novel statistical approach to inferring branch probabilities that improves the performance of programs that are compiled without profile guided optimizations. We perform offline training using information that is collected from a large corpus of binaries that have branch probabilities information. The learned model is used by the compiler to predict the branch probabilities of regular uninstrumented programs, which the compiler can then use to inform optimization decisions. We integrate our technique directly in LLVM, supplementing the existing human-engineered compiler heuristics. We evaluate our technique on a suite of benchmarks, demonstrating some gains over compiling without profile information. In deployment, our technique requires no profiling runs and has negligible effect on compilation time.

READ FULL TEXT
research
02/10/2022

Learning Branch Probabilities in Compiler from Datacenter Workloads

Estimating the probability with which a conditional branch instruction i...
research
06/28/2022

Compilation Forking: A Fast and Flexible Way of Generating Data for Compiler-Internal Machine Learning Tasks

Compiler optimization decisions are often based on hand-crafted heuristi...
research
11/23/2021

Generating GPU Compiler Heuristics using Reinforcement Learning

GPU compilers are complex software programs with many optimizations spec...
research
11/20/2020

AZP: Automatic Specialization for Zero Values in Gaming Applications

Recent research has shown that dynamic zeros in shader programs of gamin...
research
08/24/2018

Substate Profiling for Effective Test Suite Reduction

Test suite reduction (TSR) aims at removing redundant test cases from re...
research
07/18/2018

BOLT: A Practical Binary Optimizer for Data Centers and Beyond

Performance optimization for large-scale applications has recently becom...
research
11/17/2022

Optimizing Function Layout for Mobile Applications

Function layout, also referred to as function reordering or function pla...

Please sign up or login with your details

Forgot password? Click here to reset