> On 15 Nov 2025, at 8:43 am, Kugan Vivekanandarajah <[email protected]> > wrote: > > External email: Use caution opening links or attachments > > > > On 15 Nov 2025, at 8:36 am, Kugan Vivekanandarajah > > <[email protected]> wrote: > > > > External email: Use caution opening links or attachments > > > > > > 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 > > > > This patch adds hierarchical discriminator support for loop versioning pass. > Assigns copyid discriminators to distinguish different loop versions. > > gcc/ChangeLog: > > * gimple-loop-versioning.cc (loop_versioning::version_loop): Assign > copyid discriminators to distinguish different loop versions.
Ping? Thanks, Kugan > > Signed-off-by: Kugan Vivekanandarajah <[email protected]> > > Thanks, > Kugan > > > > <0003-AutoFDO-Add-hierarchical-discriminator-for-loop-vers.patch>
0003-AutoFDO-Add-hierarchical-discriminator-for-loop-vers.patch
Description: 0003-AutoFDO-Add-hierarchical-discriminator-for-loop-vers.patch
