[commit: ghc] ghc-8.0: Make demand analysis understand catch (6135de3)
git at git.haskell.org
git at git.haskell.org
Mon Jan 18 12:24:34 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/6135de3b59d388aabbd880bc71ae44532647b9f1/ghc
>---------------------------------------------------------------
commit 6135de3b59d388aabbd880bc71ae44532647b9f1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jan 6 17:40:09 2016 +0000
Make demand analysis understand catch
As Trac #11222, and #10712 note, the strictness analyser
needs to be rather careful about exceptions. Previously
it treated them as identical to divergence, but that
won't quite do.
See Note [Exceptions and strictness] in Demand, which
explains the deal.
Getting more strictness in 'catch' and friends is a
very good thing. Here is the nofib summary, keeping
only the big ones.
--------------------------------------------------------------------------------
Program Size Allocs Runtime Elapsed TotalMem
--------------------------------------------------------------------------------
fasta -0.1% -6.9% -3.0% -3.0% +0.0%
hpg -0.1% -2.0% -6.2% -6.2% +0.0%
maillist -0.1% -0.3% 0.08 0.09 +1.2%
reverse-complem -0.1% -10.9% -6.0% -5.9% +0.0%
sphere -0.1% -4.3% 0.08 0.08 +0.0%
x2n1 -0.1% -0.0% 0.00 0.00 +0.0%
--------------------------------------------------------------------------------
Min -0.2% -10.9% -17.4% -17.3% +0.0%
Max -0.0% +0.0% +4.3% +4.4% +1.2%
Geometric Mean -0.1% -0.3% -2.9% -3.0% +0.0%
On the way I did quite a bit of refactoring in Demand.hs
(cherry picked from commit 9915b6564403a6d17651e9969e9ea5d7d7e78e7f)
>---------------------------------------------------------------
6135de3b59d388aabbd880bc71ae44532647b9f1
compiler/basicTypes/Demand.hs | 870 ++++++++++++---------
compiler/coreSyn/CoreArity.hs | 3 +-
compiler/coreSyn/MkCore.hs | 7 +-
compiler/prelude/primops.txt.pp | 47 +-
compiler/stgSyn/CoreToStg.hs | 6 +-
compiler/stranal/DmdAnal.hs | 14 +-
compiler/stranal/WorkWrap.hs | 5 +-
.../tests/deSugar/should_compile/T2431.stderr | 2 +-
.../tests/numeric/should_compile/T7116.stdout | 8 +-
.../tests/simplCore/should_compile/T3772.stdout | 2 +-
.../tests/simplCore/should_compile/T4930.stderr | 4 +-
.../simplCore/should_compile/spec-inline.stderr | 2 +-
testsuite/tests/stranal/sigs/HyperStrUse.stderr | 2 +-
testsuite/tests/stranal/sigs/T8598.stderr | 2 +-
testsuite/tests/stranal/sigs/UnsatFun.stderr | 4 +-
15 files changed, 550 insertions(+), 428 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 6135de3b59d388aabbd880bc71ae44532647b9f1
More information about the ghc-commits
mailing list