Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-07 Thread Jan Hubicka via Gcc-patches
> > Yeah, the fast summary array lookup itself seems fine. What slowed > this down for me was instead: > > /* A single function body may be represented by multiple symbols with > different visibility. For example, if FUNC is an interposable alias, > we don't want to return anything,

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-07 Thread Richard Sandiford via Gcc-patches
Thanks for the info. Jan Hubicka writes: >> On Mon, Dec 6, 2021 at 4:03 PM Richard Biener >> wrote: >> > >> > On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford >> > wrote: >> > > >> > > Richard Biener writes: >> > > > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches >> > > >

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-07 Thread Jan Hubicka via Gcc-patches
> > Notice the ??? comment. The code does not set clobbers here because it > > assumes that tree-ssa-alias will do the right thing. > > So one may make builtins handling first, PTA next and only if both say > > "may alias" continue. Other option is to extend the code here to add > > propert clobbe

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-06 Thread Richard Biener via Gcc-patches
On Mon, Dec 6, 2021 at 4:45 PM Jan Hubicka wrote: > > > On Mon, Dec 6, 2021 at 4:03 PM Richard Biener > > wrote: > > > > > > On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford > > > wrote: > > > > > > > > Richard Biener writes: > > > > > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-06 Thread Jan Hubicka via Gcc-patches
> On Mon, Dec 6, 2021 at 4:03 PM Richard Biener > wrote: > > > > On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford > > wrote: > > > > > > Richard Biener writes: > > > > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches > > > > wrote: > > > >> > > > >> When compiling an optabs.ii

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-06 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches >> > wrote: >> >> >> >> When compiling an optabs.ii at -O2 with a release-checking build, >> >> we spent a lot

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-06 Thread Richard Biener via Gcc-patches
On Mon, Dec 6, 2021 at 4:03 PM Richard Biener wrote: > > On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford > wrote: > > > > Richard Biener writes: > > > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches > > > wrote: > > >> > > >> When compiling an optabs.ii at -O2 with a release

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-06 Thread Richard Biener via Gcc-patches
On Mon, Dec 6, 2021 at 11:10 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> When compiling an optabs.ii at -O2 with a release-checking build, > >> we spent a lot of time in call_may_clobber_ref_p.

Re: [PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-05 Thread Richard Biener via Gcc-patches
On Sun, Dec 5, 2021 at 10:59 PM Richard Sandiford via Gcc-patches wrote: > > When compiling an optabs.ii at -O2 with a release-checking build, > we spent a lot of time in call_may_clobber_ref_p. One of the > first things the function tries is the get_modref_function_summary > approach, but that a

[PATCH] alias: Optimise call_may_clobber_ref_p

2021-12-05 Thread Richard Sandiford via Gcc-patches
When compiling an optabs.ii at -O2 with a release-checking build, we spent a lot of time in call_may_clobber_ref_p. One of the first things the function tries is the get_modref_function_summary approach, but that also seems to be the most expensive check. At least for the optabs.ii test, most of t