Hi, >> >> I think we want to solve two problems >> 1) Handle situation when statement is duplicated (unrolling, loop >> header copying etc.) and thus different locations in program >> corresponds to different copies. >> >> Current code simply picks address with maximal count (expecting that >> the statemnt perhaps spans multiple BBs) while we should really sum >> counts of execution of different copies. >> 1) Handle situation where single address implies multiple executions >> of the same statement (i.e. after vectorization) >>
Here is the revised patch-set. In this:2 1. I have dropped gcov changes to 32bit discriminator. Instead I have changed autofdo tools to handle multiplicity and copy-id. I have put-up a pull request to autfdo tools as https://github.com/google/autofdo/pull/257. This means all the changes to auto-profile pass is not needed for this. We could still add 32bit support if there is a need as a follow up. I have the split the patch into 1. Hierarchical discriminate support 2. Change vectoriser to add hierarchal discriminator 3. Adding hierarchical discriminate for loop versioning 4. Adding hierarchical discriminate for loop unrolling Bootstrapped and regression tested together on aarch64-linux-gnu. Is this OK? Thanks, Kugan
