[PATCH] Always emit function declaration when generating profile instrumentation

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed May 28 13:56:23 PDT 2014


> On 2014-May-28, at 13:43, Reid Kleckner <rnk at google.com> wrote:
> 
> 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?

Coverage.  There's a difference between "no data" (this function wasn't
instrumented) and "never called" (counter is zero).  This patch moves unused
functions from the former category to the latter.



More information about the cfe-commits mailing list