[PATCH] Always emit function declaration when generating profile instrumentation

Reid Kleckner rnk at google.com
Wed May 28 13:43:23 PDT 2014


On Wed, May 28, 2014 at 1:06 PM, Alex L <arphaman at gmail.com> wrote:

> Sure, We need to call CodeGenPGO::assignRegionCounters for all functions
> because we want to emit counter variables for all functions in a
> translation unit, even if they aren't used.
>

Why do you want to emit counter variables for unused functions?  That seems
like useless object file bloat.


> Currently static functions, and also class methods defined inside a class
> and inline methods defined outside of class aren't processed by
> assignRegionCounters when they aren't used. Therefore we have to emit those
> functions so that the profile counters are also emitted for them.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140528/8ae8b108/attachment.html>


More information about the cfe-commits mailing list