FDO: Magic 'Make My Program Faster' Compilation Option?

1,303 views · Published 4 April 2017 · 57:46 · Indexed 12 November 2026

Channel: The Linux Foundation · 2017 · Science & Technology

Watch on YouTube

FDO: Magic 'Make My Program Faster' Compilation Option? - Pawel Moll, ARM

Feedback Driven Optimisation (FDO), also known as Profile Guided Optimisation (PGO) is a well known code optimisation technique, employed by compilers since mid XX century, yet not widely used in the wild these days. It relies on providing runtime-captured information about code execution (eg. "branch taken or not?") during next code compilation, improving quality of decisions made by compiler heuristics. 

To be fair, there were good reasons for its demise which I hope to discuss, mainly time and complexity overhead and deployment difficulties, but there is some hope on the horizon, coming with new approach, called AutoFDO and originating at Google, based on statistical profiling (namely Linux perf + extra tools) and source code level attribution. I'll discuss existing support for it available in mainline GCC and LLVM and give examples of real-life, successful deployments.

About Pawel Moll

I've worked with so called "embedded Linux" for more then ten years now, currently for ARM in Cambridge, UK as a Principal Engineer, with main focus on Linux developer tools, in all possible form and shape. My recent interest include performance analysis and optimisation. Every now and then I also act as a trainer on ARM software courses, write developer articles and give technical talks (including many LinuxCon Europe and ELC-E conferences).

More from this channel