Automatic PGO - Initial implementation (1/N)
dnovillo at google.com
Mon Sep 30 11:07:06 PDT 2013
On Sat, Sep 28, 2013 at 11:39 PM, Bob Wilson <bob.wilson at apple.com> wrote:
> 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?
Right. That's what I meant. The counts from the individual
instructions get propagated to the basic block owning them, and, in
turn, to branch weights.
> 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?
Functions have weights too. In principle, those are converted into
I should have a followup patch in the next few days (I'm struggling a
bit with adding new flags to the driver, it seems a bit more
convoluted that I was expecting).
More information about the llvm-commits