[llvm] r238335 - Fix PR 23499 - Avoid multiple profile counters for functions in comdat sections.

Diego Novillo dnovillo at google.com
Wed May 27 11:20:50 PDT 2015

On Wed, May 27, 2015 at 2:18 PM, Xinliang David Li <xinliangli at gmail.com> wrote:

> Multiple copies of counters for comdat functions might actually be a feature
> instead of a bug. Consider the case when instrumented comdat function gets
> inlined into the caller.  Keeping different copies of counters allows more
> context sensitive profiling while de-duping the counters causes the profiles
> of inline instances to be merged into the out of line instance.

In this case, we'd need to make them private.  With the previous
scheme, they were sharing the counter slot.

> This is a moot point for now as there is no profile-use mechanism to take
> advantage of that context-sensitivity (i.e., using inline instance profile
> copy during inline profile update). So this patch is fine for now and can be
> revisited later if we lose perf opportunities).



More information about the llvm-commits mailing list