Re: Do not drop discriminator when inlining

2025-06-25 Thread Jan Hubicka
> > What seems to be common now is profile breakage around loops that has > > been fully unrolled or vectorized which is bit undderstandbale thought I > > wonder if we can improve here. I think we can fix problem where profile > > of loop header stmts is partly or fully lost (which seems to be mai

Re: Do not drop discriminator when inlining

2025-06-24 Thread Richard Biener
On Tue, 24 Jun 2025, Jan Hubicka wrote: > > On Sun, 22 Jun 2025, Jan Hubicka wrote: > > > > > Hi, > > > auto-fdo is currently confused by a fact that all inlined functions get > > > locators with 0 discriminator, so it is not bale to distinguish multiple > > > inlined calls from single line. > >

Re: Do not drop discriminator when inlining

2025-06-24 Thread Richard Biener
On Tue, 24 Jun 2025, Jan Hubicka wrote: > > > That is why I checked for loc != UNKNOWN_LOCATION. I did not expect > > > UNKNOWN_LOCATION to have discriminators. What they are good for? > > > > I have no idea, this was simply a defensive review where it's no > > longer obvious that inlined_functi

Re: Do not drop discriminator when inlining

2025-06-24 Thread Sam James
Jan Hubicka writes: >> > That is why I checked for loc != UNKNOWN_LOCATION. I did not expect >> > UNKNOWN_LOCATION to have discriminators. What they are good for? >> >> I have no idea, this was simply a defensive review where it's no >> longer obvious that inlined_function_outer_scope_p would s

Re: Do not drop discriminator when inlining

2025-06-24 Thread Jan Hubicka
> > That is why I checked for loc != UNKNOWN_LOCATION. I did not expect > > UNKNOWN_LOCATION to have discriminators. What they are good for? > > I have no idea, this was simply a defensive review where it's no > longer obvious that inlined_function_outer_scope_p would still work > in all cases.

Re: Do not drop discriminator when inlining

2025-06-23 Thread Jan Hubicka
> On Sun, 22 Jun 2025, Jan Hubicka wrote: > > > Hi, > > auto-fdo is currently confused by a fact that all inlined functions get > > locators with 0 discriminator, so it is not bale to distinguish multiple > > inlined calls from single line. > > > > Discriminator is lost by calling LOCATION_LOCUS

Re: Do not drop discriminator when inlining

2025-06-22 Thread Richard Biener
On Sun, 22 Jun 2025, Jan Hubicka wrote: > Hi, > auto-fdo is currently confused by a fact that all inlined functions get > locators with 0 discriminator, so it is not bale to distinguish multiple > inlined calls from single line. > > Discriminator is lost by calling LOCATION_LOCUS before copying i

Do not drop discriminator when inlining

2025-06-22 Thread Jan Hubicka
Hi, auto-fdo is currently confused by a fact that all inlined functions get locators with 0 discriminator, so it is not bale to distinguish multiple inlined calls from single line. Discriminator is lost by calling LOCATION_LOCUS before copying it from former call statement. I believe this is only