Re: [AUTOFDO] Fix annotated profile for de-duplicated call

2025-05-21 Thread Kugan Vivekanandarajah
Ping? Thanks, Kugan > On 9 May 2025, at 11:51 am, Kugan Vivekanandarajah > wrote: > > External email: Use caution opening links or attachments > > > This patch fixes wrong annotation of profiles when call statement is > de-duplicated. i.e., when we may have same st

Re: [AUTOFDO] Enable ipa-split for auto-profile

2025-05-21 Thread Kugan Vivekanandarajah
Ping? Thanks, Kugan > On 9 May 2025, at 11:55 am, Kugan Vivekanandarajah > wrote: > > ipa-split is not now run for auto-profile. IMO this was an oversight. > This patch enables it similar to PGO runs. > > gcc/ChangeLog: > >* ipa-split.cc pass_feedback_spl

Re: [AUTOFDO] Merge profiles of clones before annotating

2025-05-28 Thread Kugan Vivekanandarajah
; Also if we merge, it may happen that the clone is noticeably different > from original - for example with ipa split it may be missing part of the > body. Merging the tables elementwise is safe then? > > Honza >> >> Thanks, >> Kugan >> >> >> &

Re: [PATCH] [AUTOFDO] Enable autofdo tests for aarch64

2025-05-29 Thread Kugan Vivekanandarajah
> On 29 May 2025, at 5:58 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> Hi, >> autofdo tests are now running only for x86. This patch makes it >> run for aarch64 too. Verified that perf and create_gcov are running >> as expected. >> >> gcc/ChangeL

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Kugan Vivekanandarajah
Hi, > On 4 Jun 2025, at 9:53 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> This patch introduces a new testcase to verify the merging of profiles >> is performed for cloned functions. >> >> Since this is invoked very early, before the pass manager,

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-18 Thread Kugan Vivekanandarajah
Hi, > On 17 Jun 2025, at 4:51 pm, Kugan Vivekanandarajah > wrote: > > External email: Use caution opening links or attachments > > >> On 17 Jun 2025, at 4:18 pm, Dhruv Chawla wrote: >> >> On 17/06/25 06:10, Kugan Vivekanandarajah wrote: >>>

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-18 Thread Kugan Vivekanandarajah
Hi, Thanks for looking. > > I think this can be simplified to > > while (*(++ptr) && only_digits) >only_digits = is_digit (*ptr); IMO this is harder to read but I am OK either way. > >> + if (only_digits) >> +*last_dot = 0; >> + char *next_dot = strrchr (ret, '.'); >> + /* if nested fu

Re: [PATCH 0/1] [RFC][AutoFDO]: Source filename tracking in GCOV

2025-06-18 Thread Kugan Vivekanandarajah
Hi, > On 17 Jun 2025, at 2:14 am, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > > Hi, >> Introduction >> >> >> Per PR120229 (gcc.gnu.org/PR120229), the auto-profile pass cannot distinguish >> profile information for `function_instance's with

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-16 Thread Kugan Vivekanandarajah
> On 17 Jun 2025, at 4:18 pm, Dhruv Chawla wrote: > > On 17/06/25 06:10, Kugan Vivekanandarajah wrote: >> External email: Use caution opening links or attachments >> Hi, >> As discusses earlier, get_original_name is used to match profile binary >> names to >

[AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-16 Thread Kugan Vivekanandarajah
Hi, As discusses earlier, get_original_name is used to match profile binary names to the symbol names in the IR during auto-profile pass. Hence, we want to strip the compiler added suffixes for names that are generated after auto-profile pass. Names we should strip: * SRA clones (of the form foo.

Re: Improve static and AFDO profile combination

2025-06-17 Thread Kugan Vivekanandarajah
Hi Honza, Thanks for the fixes. > On 18 Jun 2025, at 1:48 am, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > > Hi, > this patch makes afdo_adjust_guessed_profile more agressive on finding scales > on the boundaries of connected components with no annotation

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Kugan Vivekanandarajah
Hi Andrew, > On 6 Jun 2025, at 8:18 am, Andrew Pinski wrote: > > External email: Use caution opening links or attachments > > > On Wed, Jun 4, 2025 at 12:02 AM Kugan Vivekanandarajah > wrote: >> >> This patch introduces a new testcase to verify the mergin

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-23 Thread Kugan Vivekanandarajah
> > With part suffixes we also may want to merge specially, since the > entry_count of the split part does not correspond to entry_count of the > original function. > > I wonder, does partitioned function work with the google tool? I > remember it had limitations in this respect. > Yes, Here a

Re: [PATCH 0/1] [RFC][AutoFDO] Propagate inline information to outline definitions if not inlined

2025-06-13 Thread Kugan Vivekanandarajah
Hi, > On 13 Jun 2025, at 7:21 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> From: Dhruv Chawla > Hi, >> >> For reasons explained in the patch, this patch prevents the loss of profile >> information when inlining occurs in the profiled binary but n

Re: Remove early inlining from afdo pass

2025-06-26 Thread Kugan Vivekanandarajah
> On 24 Jun 2025, at 7:43 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > > Hi, > this pass removes early-inlining from afdo pass since all inlining > should now happen from early inliner. I tedted this on spec and there > are 3 inlines happening here

[AutoFDO] Profile merging for clone test

2025-06-04 Thread Kugan Vivekanandarajah
This patch introduces a new testcase to verify the merging of profiles is performed for cloned functions. Since this is invoked very early, before the pass manager, we need to set up the dumping explicitly. This is similar to the handling in finish_optimization_passes. gcc/ChangeLog: * a

[PATCH] [AUTOFDO] Enable autofdo tests for aarch64

2025-05-28 Thread Kugan Vivekanandarajah
Hi, autofdo tests are now running only for x86. This patch makes it run for aarch64 too. Verified that perf and create_gcov are running as expected. gcc/ChangeLog: * config/aarch64/gcc-auto-profile: Make script executable. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Enab

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Kugan Vivekanandarajah
Hi Honza, > On 6 Jun 2025, at 6:34 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> Kugan Vivekanandarajah writes: >>> Add support for autoprofiledbootstrap in aarch64. >>> This is similar to what is done for

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Kugan Vivekanandarajah
Hi Ricjard, > On 7 Jun 2025, at 1:12 am, Richard Sandiford > wrote: > > External email: Use caution opening links or attachments > > > Jan Hubicka writes: >>> Should I go with: >>> >>> +autofdo_target >>> >>> +autofdo_target="i386" >>> +case "${target}" in >>> + aarch64-*-*) >>> +autofdo

Re: [AutoFDO] Profile merging for clone test

2025-06-08 Thread Kugan Vivekanandarajah
> On 9 Jun 2025, at 9:43 am, Kugan Vivekanandarajah > wrote: > > > > > On 7 Jun 2025, at 3:30 pm, Kugan Vivekanandarajah > > wrote: > > > > Hi, > > > > > > > On 6 Jun 2025, at 4:15 pm, Kugan Vivekanandarajah > > > wrote

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-08 Thread Kugan Vivekanandarajah
[sending again as the email seems to have not delivered] Hi Richard, > On 7 Jun 2025, at 1:12 am, Richard Sandiford > wrote: > > External email: Use caution opening links or attachments > > > Jan Hubicka writes: >>> Should I go with: >>> >>> +autofdo_target >>> >>> +autofdo_target="i386"

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-26 Thread Kugan Vivekanandarajah
Hi Honza, > On 24 Jun 2025, at 4:37 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >>> >>> With part suffixes we also may want to merge specially, since the >>> entry_count of the split part does not correspond to entry_count of the >>> original function.

Re: Remove early inlining from afdo pass

2025-06-26 Thread Kugan Vivekanandarajah
Hi Honza, > On 27 Jun 2025, at 1:03 am, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> >> >>> On 24 Jun 2025, at 7:43 pm, Jan Hubicka wrote: >>> >>> External email: Use caution opening links or attachments >>> >>> >>> Hi, >>> this pass removes earl

Re: AFDO/FDO profile comparator

2025-06-30 Thread Kugan Vivekanandarajah
Hi Honza, On Sun, Jun 29, 2025 at 10:45 PM Jan Hubicka wrote: > > > > > > > > On 24 Jun 2025, at 7:43 pm, Jan Hubicka wrote: > > > > > > External email: Use caution opening links or attachments > > > > > > > > > Hi, > > > this pass removes early-inlining from afdo pass since all inlining > > > s

<    1   2   3