计算机科学 > 程序设计语言
[提交于 2021年12月24日]
标题:Profile Guided Optimization without Profiles: A Machine Learning Approach
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Nadav Rotem[v1] 2021年12月24日 星期五 22:49:21 UTC