[llvm] [TRE] Adjust function entry count (PR #143987)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 13:52:58 PDT 2025


mtrofin wrote:

TRE happens after instrumentation.

For sampling, if the function was TRE-ed in the binary the sample collection happens on, then its entry count would be correct if we TRE again when we use the profile and recompile. If we don't, it'd be a sub-estimate. We don't have a way to know what happened in the first compilation, either. So we don't have an appropriate fix, and (unchanged by this PR) sometimes the counts are right, but it could be they aren't.

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


More information about the llvm-commits mailing list