Join points!

2016-12-15 Thread Simon Peyton Jones via ghc-devs
Everyone: please take a look. Luke Very good. · I think it’s fine to work from your repo; no need to use the main repo. · One big patch is fine. The exception is late lambda-lifting which would best be done separately. · Can you identify any bits that you are less h

Join points

2017-01-17 Thread Luke Maurer
Hello all! For your consideration, I present patch D2853: Join points. https://phabricator.haskell.org/D2853 It validates* and it's ready for wider reviewing, so please help me get it to land before the freeze! It's ... sizable. There's not really any way to split it, since

RE: Join points

2017-01-17 Thread Simon Peyton Jones via ghc-devs
c-devs Subject: Join points Hello all! For your consideration, I present patch D2853: Join points. https://phabricator.haskell.org/D2853 It validates* and it's ready for wider reviewing, so please help me get it to land before the freeze! It's ... sizable. There's not really any w

Join points revised

2017-01-31 Thread Luke Maurer
Revised version of the join points patch is up: https://phabricator.haskell.org/D2853 Hoping to commit ASAP. Thanks all! - Luke Maurer University of Oregon maur...@cs.uoregon.edu ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org

Re: Join points revised

2017-01-31 Thread Ben Gamari
Luke Maurer writes: > Revised version of the join points patch is up: > > https://phabricator.haskell.org/D2853 > > Hoping to commit ASAP. Thanks all! > I have a few further review comments that I'm about to submit. Cheers, - Ben signature.asc Des

RE: Join points revised

2017-02-01 Thread Simon Peyton Jones via ghc-devs
From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Luke | Maurer | Sent: 31 January 2017 23:48 | To: ghc-devs | Subject: Join points revised | | Revised version of the join points patch is up: | | https://phabricator.haskell.org/D2853 | | Hoping to commit ASAP.

Talkative Join points warning

2017-02-02 Thread Ben Gamari
(e.g. -fvanishing-join-points) might be helpful. Cheers, - Ben signature.asc Description: PGP signature ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Join points and loopificaiton

2017-04-12 Thread Simon Peyton Jones via ghc-devs
tion under "New idea: use join points". Let's do it! Ticket here: https://ghc.haskell.org/trac/ghc/ticket/13567 Simon ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Re: [commit: ghc] wip/float-join-points: Wip on floating join points (128e4c1)

2017-10-27 Thread Joachim Breitner
Hi Simon, Am Freitag, den 27.10.2017, 15:24 + schrieb g...@git.haskell.org: > commit 128e4c1ffa29f3dfade7128152c143cd601aaa3a > Author: Simon Peyton Jones > Date: Fri Oct 27 16:20:24 2017 +0100 > > Wip on floating join points do you expect to merge that soon

Re: Talkative Join points warning

2017-02-02 Thread Matthew Pickering
rather difficult to see through the > noise. > > This is actually perhaps another case where Simon Marlow suggestion of > introducing a family of -v* flags (e.g. -fvanishing-join-points) might > be helpful. > > Cheers, > > - Ben > > ___

RE: Talkative Join points warning

2017-02-02 Thread Simon Peyton Jones via ghc-devs
Talkative Join points warning | | | Hi Luke, | | I've noticed that a new WARN in OccurAnal seems to be quite loud. | Validations now produce thousands of lines of the form, | | WARNING: file compiler/simplCore/OccurAnal.hs, line 2633 | OccurAnal failed to rediscover join poi

Re: Talkative Join points warning

2017-02-02 Thread Luke Maurer
shouldn't! S | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Ben | Gamari | Sent: 02 February 2017 21:36 | To: Luke Maurer | Cc: ghc-devs@haskell.org | Subject: Talkative Join points warning | | | Hi Luke, | | I've noticed that a new WARN

Re: Join points and loopificaiton

2017-04-12 Thread Thomas Jakway
intern, mainly working on LLVM backend stuff. But he knows a lot about CPS etc and he'd read our paper. In talking about it, we realised a new Join Point Win! I’ve written it up in https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Loopification under “New idea: use join points”. Let

Re: Join points and loopificaiton

2017-04-12 Thread Carter Schonwald
. In > talking about it, we realised a new Join Point Win! > > I’ve written it up in > > https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Loopification > > under “New idea: use join points”. Let’s do it! > > Ticket here: https

Common Context transformation for join points

2013-12-11 Thread Joachim Breitner
Hi all, I just came up with this, and unless I write it down I doubt I’ll be able to fall asleep. The problem I’m trying to solve is the bad interaction of the CPR worker wrapper transformation and join points. Consider, as a running example: f x = let $j n = Just (Int# (n +# 1)) in case x of

Re: Common Context transformation for join points

2013-12-17 Thread Joachim Breitner
Hi, I created a first prototype of this optimization (branch wip/common-context), and the results are a clear, although very small win in some benchmarks, and no regression (ignoring the flaky cacheprof): Pro

RE: Common Context transformation for join points

2013-12-31 Thread Simon Peyton-Jones
ll.org] On Behalf Of | Joachim Breitner | Sent: 12 December 2013 01:29 | To: ghc-devs@haskell.org | Subject: Common Context transformation for join points | | Hi all, | | I just came up with this, and unless I write it down I doubt I’ll be | able to fall asleep. | | The problem I’m trying

Re: Common Context transformation for join points

2013-12-31 Thread Joachim Breitner
Hi, Am Dienstag, den 31.12.2013, 11:33 + schrieb Simon Peyton-Jones: > Interesting. We can discuss when you get back, but let me jot down > one comment. You write: > > | This will always happen if the join point function gets a richer > | CPR property than the function that it belongs to >

Unexpected duplicate join points in "Core" output?

2021-11-19 Thread Viktor Dukhovni
The below "Core" output from "ghc -O2" (9.2/8.10) for the attached program shows seemingly rendundant join points: join { exit :: State# RealWorld -> (# State# RealWorld, () #) exit (ipv :: State# RealWorld) = jump $s$j ipv } in join {

Non-escaping lets, join-points and binding updatability

2013-10-16 Thread Jan Stolarek
s not have to be true (lambdas) 3. Join-points are implemented using LNE bindings and I can imagine a join-points not having any parameters (and not being a lambda). Three points above seem inconsistent - where does my reasoning go wrong? I suspect that the Note might be wrong and an upda

Are join points inlined differently from normal bindings?

2018-01-16 Thread Matthew Pickering
ssion from 8.0.2. However, I make a mailing list post as I unsure how to expect the inliner to treat join points. Questions. 1. Does the inliner treat join point bindings differently to normal bindings? 2. How can I stop the compiler introducing this join point which seems to get in the way o

Re: Non-escaping lets, join-points and binding updatability

2013-10-16 Thread Nicolas Frisby
If I understand correctly, the LNE-detection in CoreToSTG makes all of the decisions; it's the only place that the StgLetNoEscape constructor arises. Join-points are only implemented as LNE if they are detected to be LNE, which they most often — but not always! — after all the core

Re: Non-escaping lets, join-points and binding updatability

2013-10-17 Thread Jan Stolarek
gt; 1. Note [What is a non-escaping let] says that one of conditions of > > binding being a non-escaping > > let is non-updatability. > > 2. My understanding is that a if a binding has at least one parameter it > > is non-updatable, though > > I suspect that converse

Re: Non-escaping lets, join-points and binding updatability

2013-10-17 Thread Simon Marlow
table, though I suspect that converse does not have to be true (lambdas) 3. Join-points are implemented using LNE bindings and I can imagine a join-points not having any parameters (and not being a lambda). A join-point always has at least one argument. If there are no arguments, then a dummy o

RE: Non-escaping lets, join-points and binding updatability

2013-10-17 Thread Simon Peyton-Jones
-boun...@haskell.org] On Behalf Of Simon | Marlow | Sent: 17 October 2013 09:44 | To: Jan Stolarek; ghc-devs@haskell.org | Subject: Re: Non-escaping lets, join-points and binding updatability | | On 16/10/2013 18:27, Jan Stolarek wrote: | > Hi all, | > | > I'm trying to understand this: | >

Re: Non-escaping lets, join-points and binding updatability

2013-10-17 Thread Jan Stolarek
Of Simon > | Marlow > | Sent: 17 October 2013 09:44 > | To: Jan Stolarek; ghc-devs@haskell.org > | Subject: Re: Non-escaping lets, join-points and binding updatability > | > | On 16/10/2013 18:27, Jan Stolarek wrote: > | > Hi all, > | > > | > I'm t

[Take 2] Unexpected duplicate join points in "Core" output?

2021-11-19 Thread Viktor Dukhovni
[ Sorry wrong version of attachment in previous message. ] The below "Core" output from "ghc -O2" (9.2/8.10) for the attached program shows seemingly rendundant join points: join { exit :: State# RealWorld -> (# State# RealWorld, () #) exit (ipv :: S

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

2021-11-20 Thread Simon Peyton Jones via ghc-devs
There is absolutely no reason not to common-up those to join points. But we can't common up some join points when we could if they were let's. Consider join j1 x = x+1 in case v of A -> f (join j2 x = x+1 in ...j2...) B -> j1... C -> j1... Even tho

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

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

2021-11-21 Thread Carter Schonwald
In this example: why would it stop being a join point ? Admittedly, my intuition might be skewed by my own ideas about how join points are sortah a semantic special case of other constructs. On Sat, Nov 20, 2021 at 4:17 PM Simon Peyton Jones via ghc-devs < ghc-devs@haskell.org> wrote: &

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 co

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

2021-11-24 Thread Simon Peyton Jones via ghc-devs
| 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 this. Just needs doing. A ticket and a repo case would be really helpful. Simon PS: I

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

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

2021-11-24 Thread Viktor Dukhovni
esult valid acc (ptr `minusPtr` start) become respectively (ipv2 and w3 are IO state tokens): 1. jump exit2 ww4 ww5 valid ipv2 -- acc ptr valid s# 2. jump exit3 ww4 ww5 w3 valid -- acc ptr s# valid So the join points are then only alpha equi

RE: Are join points inlined differently from normal bindings?

2018-01-16 Thread Simon Peyton Jones via ghc-devs
GHC developers | Subject: Are join points inlined differently from normal bindings? | | I have quite a complicated program which relies on the optimiser inlining | very aggressively. | | In 8.0.2, it works fine and produces the core I am expecting. | | In 8.2.2, one of the bindings is identified

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

2021-11-20 Thread Andreas Klebinger
Hello Victor, generally GHC does try to common up join points and duplicate expressions like that. But since that's relatively expensive most of the duplication happens during the core-cse pass which only happens once. We don't create them because they are harmless. They are sim

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

2021-11-20 Thread Viktor Dukhovni
On Sat, Nov 20, 2021 at 12:49:08PM +0100, Andreas Klebinger wrote: > For the assembly I opened a ticket: > https://gitlab.haskell.org/ghc/ghc/-/issues/20714 Thanks, much appreciated. Understood re redundant join points, though in the non-toy context the redundnat point code is noticeably

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

2021-11-20 Thread Viktor Dukhovni
On Sat, Nov 20, 2021 at 01:54:36PM -0500, Viktor Dukhovni wrote: > Is there some way for GHC to figure out to not float out such cheap > computations? The 'Result' constructor is strict, so there's no cost to > evaluating `used > 0`, and cloning the entire computation is I think > the more unfort

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

2021-11-20 Thread Andreas Klebinger
d a ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/20714 Thanks, much appreciated. Understood re redundant join points, though in the non-toy context the redundnat point code is noticeably larger. join { exit4 :: Addr# -> Word# ->