[llvm-branch-commits] [llvm] [PGO] Mark unprofiled functions cold by default in IRPGO (PR #243620)
Teresa Johnson via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 18 10:46:56 PST 2026
teresajohnson wrote:
> I agree that this flag should not be on by default. For the machine outliner, we have a flag enum with `optimistic-pgo` or `conservative-pgo`.
>
> https://github.com/llvm/llvm-project/blob/e856b2bf17f226ffc914d7c20ef78c7cd08f2949/llvm/lib/CodeGen/TargetPassConfig.cpp#L82-L96
>
> Maybe we could have a similar flag enum? For perf sensitive applications I could imagine someone wanting new functions to be hot by default. If conservative/optimistic is confusing, the options could be `default-cold`, `default-hot`, `default-none`.
Not only new functions, but load tests and other profile collection runs may not have 100% coverage of code run in full workloads, and treating them as cold can have negative performance ramifications.
https://github.com/llvm/llvm-project/pull/243620
More information about the llvm-branch-commits
mailing list