Re: [commit: ghc] master: Hoopl.Collections: change right folds to strict left folds (2974b2b)

2018-02-05 Thread Michal Terepeta
On Mon, Feb 5, 2018 at 12:19 PM Simon Peyton Jones 
wrote:

> Hi Michael
>
> Thanks for pushing forward with Hoopl and other back-end things.
>
> Did this patch elicit any performance gains?  Or what brought it to your
> attention?
>

I noticed this some time ago and just now got around to try it out. I was
hoping for some improvements, sadly the differences (if any) were too small
compared to noise. But it seemed like a nice change on its own, so I
decided to send it out.


> Do you have further plans for Hoopl and GHC's back end?
>

The biggest thing is probably:
https://github.com/ghc-proposals/ghc-proposals/pull/74
Other than that, I haven't made any plans yet ;) There are a few tickets
that I'd like to make some progress on. And I might try a few experiments
looking for some compile-time improvements in the Hoopl/backend - I think
currently nobody (including myself) is very keen on introducing new passes
or making existing ones more powerful due to compile-time constraints.
And then there are efforts by Moritz (LLVM backend using binary bitcode)
and Kavon (LLVM changes to support CPS-style calls) that sound really
interesting to me. (but they do require some more time to understand all
the context/changes, so I'm not sure if or how much I'll be able to help)

- Michal
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: [commit: ghc] master: Hoopl.Collections: change right folds to strict left folds (2974b2b)

2018-02-05 Thread Simon Peyton Jones via ghc-devs
Hi Michael

Thanks for pushing forward with Hoopl and other back-end things.

Did this patch elicit any performance gains?  Or what brought it to your 
attention?

Do you have further plans for Hoopl and GHC's back end?

Simon

|  -Original Message-
|  From: ghc-commits [mailto:ghc-commits-boun...@haskell.org] On Behalf
|  Of g...@git.haskell.org
|  Sent: 03 February 2018 00:56
|  To: ghc-comm...@haskell.org
|  Subject: [commit: ghc] master: Hoopl.Collections: change right folds
|  to strict left folds (2974b2b)
|  
|  Repository : ssh://g...@git.haskell.org/ghc
|  
|  On branch  : master
|  Link   :
|  https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fghc.ha
|  skell.org%2Ftrac%2Fghc%2Fchangeset%2F2974b2b873b4bad007c619c6e32706123
|  a612428%2Fghc=02%7C01%7Csimonpj%40microsoft.com%7C19a7af179b224ee
|  8b74708d56aa0fa00%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C6365321
|  61979971135=muRQGh3GHuEirDVMUgTb0JKbBUkvqceymKFQTt9eAY0%3D
|  ved=0
|  
|  >---
|  
|  commit 2974b2b873b4bad007c619c6e32706123a612428
|  Author: Michal Terepeta <michal.terep...@gmail.com>
|  Date:   Thu Feb 1 00:30:22 2018 -0500
|  
|  Hoopl.Collections: change right folds to strict left folds
|  
|  It seems that most uses of these folds should be strict left folds
|  (I could only find a single place that benefits from a right
|  fold).
|  So this removes the existing `setFold`/`mapFold`/`mapFoldWihKey`
|  replaces them with:
|  - `setFoldl`/`mapFoldl`/`mapFoldlWithKey` (strict left folds)
|  - `setFoldr`/`mapFoldr` (for the less common case where a right
|  fold
|actually makes sense, e.g., `CmmProcPoint`)
|  
|  Signed-off-by: Michal Terepeta <michal.terep...@gmail.com>
|  
|  Test Plan: ./validate
|  
|  Reviewers: bgamari, simonmar
|  
|  Reviewed By: bgamari
|  
|  Subscribers: rwbarton, thomie, carter, kavon
|  
|  Differential Revision: https://phabricator.haskell.org/D4356
|  
|  
|  >---
|  
|  2974b2b873b4bad007c619c6e32706123a612428
|   compiler/cmm/CmmCommonBlockElim.hs |  4 ++--
|   compiler/cmm/CmmContFlowOpt.hs |  6 +++---
|   compiler/cmm/CmmProcPoint.hs   | 20 ++--
|   compiler/cmm/CmmUtils.hs   |  6 +++---
|   compiler/cmm/Hoopl/Collections.hs  | 16 ++--
|   compiler/cmm/Hoopl/Dataflow.hs |  8 
|   compiler/cmm/Hoopl/Graph.hs|  6 +++---
|   compiler/cmm/Hoopl/Label.hs|  9 ++---
|   compiler/nativeGen/RegAlloc/Graph/Spill.hs |  9 -
|   9 files changed, 45 insertions(+), 39 deletions(-)
|  
|  Diff suppressed because of size. To see it, use:
|  
|  git diff-tree --root --patch-with-stat --no-color --find-copies-
|  harder --ignore-space-at-eol --cc
|  2974b2b873b4bad007c619c6e32706123a612428
|  ___
|  ghc-commits mailing list
|  ghc-comm...@haskell.org
|  https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.h
|  askell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-
|  commits=02%7C01%7Csimonpj%40microsoft.com%7C19a7af179b224ee8b7470
|  8d56aa0fa00%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C6365321619799
|  71135=hSeyqtbepopL%2FkSme3DPLOQQKf9WCLWsdVMh86tbx4o%3D=
|  0
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs