Automatic PGO - Initial implementation (1/N)

Bob Wilson bob.wilson at
Sat Sep 28 20:39:03 PDT 2013

On Sep 24, 2013, at 7:07 AM, Diego Novillo <dnovillo at> wrote:
> 3- I have not included in this patch changes to the analyzer. I
>   want to keep it focused to the profile loading and IR
>   annotation. In the analyzer, we will have propagation of
>   attributes and other fixes (e.g., from the samples it is
>   possible to have instructions on the same basic block
>   registered with differing number of samples). I also have not
>   included changes to code motion to get rid of the autoprofile
>   information.

Sorry for the slow response.  I wanted to take the time to read this carefully and didn’t get to it earlier in the week.  Overall, it looks good.  I’m not sure what you mean by “the analyzer” in the comment above.  Can you say anything more about what you expect to happen with the metadata inserted by this patch?  In particular, you’re adding sample counts to instructions with the AutoProfileSamplesMDKind metadata nodes.  Hopefully those will be converted to branch_weights metadata?  The branch weight info is not really sufficient, though.  We also need to add metadata to track function invocation counts.  Do you have any plans to tackle that or opinions about what it ought to look like?

More information about the llvm-commits mailing list