[llvm] [PGO] Add llvm.loop.estimated_trip_count metadata (PR #152775)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 13 13:30:04 PDT 2025


nikic wrote:

> I have not addressed the general issue raised there about whether pgo-estimated-trip-counts is actually worthwhile and whether we should constrain it or disable it by default. What do people think now after seeing the above changes?

I think we should at least start by not having the pass and only doing on the fly updates. I assume that this patch is intended to be NFC-ish, but it does cause codegen changes, and as-is it's hard to tell whether that's because of the new loop metadata that is present everywhere, or due to divergence between branch weights and the metadata. (A sample to look at would be libclamav_nsis_LZMADecode.c from llvm-test-suite.)

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


More information about the llvm-commits mailing list