[llvm] [CodeGen] Preserve branch weights from PGO profile during instruction selection at -O0 (PR #161620)

Grigory Pastukhov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 09:34:41 PDT 2025


grigorypas wrote:

> ...but why?

@aemerson This is useful in some situations such as for analyzing profile quality and calculating performance proxy. It is already enabled in LLVM IR (see #113985 and also motivation in the PR message). Also, this functionality #124334 will not work correctly in O0 without this PR. 

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


More information about the llvm-commits mailing list