Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Sep 2023, Filip Kastl wrote: > > That's interesting. Your placement at > > > > NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */); > > NEXT_PASS (pass_phiopt, true /* early_p */); > > + NEXT_PASS (pass_sccp); > > > > and > > > >NEXT_PASS

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Filip Kastl
> That's interesting. Your placement at > > NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */); > NEXT_PASS (pass_phiopt, true /* early_p */); > + NEXT_PASS (pass_sccp); > > and > >NEXT_PASS (pass_tsan); >NEXT_PASS (pass_dse, true /* use DR

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Richard Biener via Gcc-patches
On Thu, 31 Aug 2023, Andrew Pinski wrote: > On Thu, Aug 31, 2023 at 5:15?AM Richard Biener via Gcc-patches > wrote: > > > > On Thu, 31 Aug 2023, Filip Kastl wrote: > > > > > > The most obvious places would be right after SSA construction and > > > > before RTL expansion. > > > > Can you provide

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Andrew Pinski via Gcc-patches
On Thu, Aug 31, 2023 at 5:15 AM Richard Biener via Gcc-patches wrote: > > On Thu, 31 Aug 2023, Filip Kastl wrote: > > > > The most obvious places would be right after SSA construction and before > > > RTL expansion. > > > Can you provide measurements for those positions? > > > > The algorithm

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Richard Biener via Gcc-patches
On Thu, 31 Aug 2023, Filip Kastl wrote: > > The most obvious places would be right after SSA construction and before > > RTL expansion. > > Can you provide measurements for those positions? > > The algorithm should only remove PHIs that break SSA form minimality. Since > GCC's SSA construction

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 31, 2023 at 01:26:37PM +0200, Filip Kastl wrote: > Regarding debug info coverage: I didn't notice any additional guality > testcases > failing after I applied the patch. *Is there any other way how I should check > debug info coverage?* I'm usually using

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Filip Kastl
> The most obvious places would be right after SSA construction and before RTL > expansion. > Can you provide measurements for those positions? The algorithm should only remove PHIs that break SSA form minimality. Since GCC's SSA construction already produces minimal SSA form, the algorithm

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-24 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 24, 2023 at 05:47:09PM +0200, Richard Biener via Gcc-patches wrote: > > Do you think that the pass is worthy of inclusion into upstream GCC? What > > are > > some things that I should change? Should I try to put the pass in different > > places in passes.def? > > The most obvious

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-24 Thread Richard Biener via Gcc-patches
> Am 24.08.2023 um 17:07 schrieb Filip Kastl : > > Hi, > > As a part of my bachelor thesis under the supervision of Honza (Jan Hubicka), > I > implemented a new PHI elimination algorithm into GCC. The algorithm is > described in the following article: > > Braun, M., Buchwald, S., Hack, S.,

[RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-24 Thread Filip Kastl
Hi, As a part of my bachelor thesis under the supervision of Honza (Jan Hubicka), I implemented a new PHI elimination algorithm into GCC. The algorithm is described in the following article: Braun, M., Buchwald, S., Hack, S., Leißa, R., Mallon, C., Zwinkau, A. (2013). Simple and Efficient