[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

Snehasish Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 1 12:12:57 PDT 2024


snehasish wrote:

> The major motivation is to detect dead functions for the services that are optimized with sampling PGO.

For your use case, can you use [ProfileSymbolList](https://github.com/llvm/llvm-project/blob/32ffc9fdc2cd422c88c926b862adb3de726e3888/llvm/include/llvm/ProfileData/SampleProf.h#L1509-L1512) to identify very cold functions (executed but unsampled) or are you indeed looking for functions that are never executed?

Will this be used to guide developers with diagnostics or more aggressive compiler driven optimizations?

https://github.com/llvm/llvm-project/pull/109837


More information about the cfe-commits mailing list