RE: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-20 Thread Simon Peyton Jones via ghc-devs
hc-devs On Behalf Of Viktor | Dukhovni | Sent: 20 November 2021 00:57 | To: ghc-devs@haskell.org | Subject: [EXTERNAL] Unexpected duplicate join points in "Core" output? | | The below "Core" output from "ghc -O2" (9.2/8.10) for the attached | program shows seemin

Re: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-20 Thread Viktor Dukhovni
On Sat, Nov 20, 2021 at 09:15:15PM +, Simon Peyton Jones via ghc-devs wrote: > GHC.Core.Opt.CSE is conservative at the moment, and never CSE's *any* > join point. It would not be hard to make it clever enough to CSE join > points, but no one has yet done it. > > Do open a ticket! Thanks, I

Re: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-21 Thread Carter Schonwald
stead. (For now, it just forwards to simo...@microsoft.com.) > > | -Original Message- > | From: ghc-devs On Behalf Of Viktor > | Dukhovni > | Sent: 20 November 2021 00:57 > | To: ghc-devs@haskell.org > | Subject: [EXTERNAL] Unexpected duplicate join points in &q

Re: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-24 Thread Viktor Dukhovni
On Sun, Nov 21, 2021 at 06:53:53AM -0500, Carter Schonwald wrote: > On Sat, Nov 20, 2021 at 4:17 PM Simon Peyton Jones via ghc-devs < > ghc-devs@haskell.org> wrote: > > > There is absolutely no reason not to common-up those to join points. But > > we can't common up some join points when we coul

RE: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-24 Thread Simon Peyton Jones via ghc-devs
November 2021 21:27 | To: ghc-devs@haskell.org | Subject: Re: [EXTERNAL] Unexpected duplicate join points in "Core" | output? | | On Sun, Nov 21, 2021 at 06:53:53AM -0500, Carter Schonwald wrote: | | > On Sat, Nov 20, 2021 at 4:17 PM Simon Peyton Jones via ghc-devs < | > ghc-devs

Re: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-24 Thread Viktor Dukhovni
On Wed, Nov 24, 2021 at 11:14:00PM +, Simon Peyton Jones via ghc-devs wrote: > | For two join points to be duplicates they need to not only be alpha > | equivalent but to also have the same continuation. > > Yes exactly. And it would not be hard to adapt the existing CSE pass > to support t

Re: [EXTERNAL] Unexpected duplicate join points in "Core" output?

2021-11-24 Thread Viktor Dukhovni
On Wed, Nov 24, 2021 at 06:32:04PM -0500, Viktor Dukhovni wrote: > > Yes exactly. And it would not be hard to adapt the existing CSE pass > > to support this. Just needs doing. > > > > A ticket and a repo case would be really helpful. > > I'll do my best to construct a standalone reproducer tha