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

Joel E. Denny via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 14:01:49 PDT 2025


jdenny-ornl wrote:

> TRE happens after instrumentation.

Thanks.

> 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.

So the issue addressed by this PR does not impact the sampling case, right?  If so, would you please clarify that in the initial PR comment / commit log?

> 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.

That issue affects all transforms, not just TRE, right?

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


More information about the llvm-commits mailing list