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

2025-05-29 Thread Jan Hubicka
> > However i do not quite follow the old or new logic here. > So if I have only one unknown edge out (or in) from BB and I know > its count, I can determine count of that edge by Kirhoff law. > > But then the old code computes number of edges out of the BB > and if it is only one it updates the

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

2025-05-29 Thread Jan Hubicka
> diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc > index 7e0e8c66124..8a317d85277 100644 > --- a/gcc/auto-profile.cc > +++ b/gcc/auto-profile.cc > @@ -1129,6 +1129,26 @@ afdo_set_bb_count (basic_block bb, const stmt_set > &promoted) >gimple *stmt = gsi_stmt (gsi); >if (gimp

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 stmt executing from > more tha

[AUTOFDO] Fix annotated profile for de-duplicated call

2025-05-08 Thread Kugan Vivekanandarajah
This patch fixes wrong annotation of profiles when call statement is de-duplicated. i.e., when we may have same stmt executing from more than one path (by jumping to same statment). Thus, the profile we get will be for multiple paths and would make the annotated profile wrong. As a fix, we dont ann