HackerPapers

arXiv:2112.14679cs.PL

Profile Guided Optimization without Profiles: A Machine Learning Approach

Nadav Rotem, Chris Cummins

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Sep 2023 to Sep 2023. Found in 1 HN submission from Dec 2021 to Dec 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • What's the benefit of having an LLM do those things in a way that guesstimates? There are big wins to be had in code-size and some wins to be had in performance related to inlining [1][2], but I think the implementation in the references directly tied into the compiler's…

      boomanaiden154View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.