[commit: ghc] master: Improvements to demand analysis (d77501c)

git at git.haskell.org git at git.haskell.org
Wed Dec 12 17:39:56 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d77501cd5b9060e38acd50e11e0c5aae89d75b65/ghc

>---------------------------------------------------------------

commit d77501cd5b9060e38acd50e11e0c5aae89d75b65
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Dec 12 17:22:07 2018 +0000

    Improvements to demand analysis
    
    This patch collects a few improvements triggered by Trac #15696,
    and fixing Trac #16029
    
    * Stop making toCleanDmd behave specially for unlifted types.
      This special case was the cause of stupid behaviour in Trac
      #16029.  And to my joy I discovered the let/app invariant
      rendered it unnecessary.  (Maybe the special case pre-dated
      the let/app invariant.)
    
      Result: less special-case handling in the compiler, and
      better perf for the compiled code.
    
    * In WwLib.mkWWstr_one, treat seqDmd like U(AAA).  It was not
      being so treated before, which again led to stupid code.
    
    * Update and improve Notes
    
    There are .stderr test wibbles because we get slightly different
    strictness signatures for an argumment of unlifted type:
        <L,U> rather than <S,U>        for Int#
        <S,U> rather than <S(S),U(U)>  for Int


>---------------------------------------------------------------

d77501cd5b9060e38acd50e11e0c5aae89d75b65
 compiler/basicTypes/Demand.hs                      | 124 +++---------
 compiler/simplStg/StgLiftLams/Analysis.hs          |   2 +-
 compiler/stranal/DmdAnal.hs                        |  28 +--
 compiler/stranal/WwLib.hs                          | 213 ++++++++++++++++-----
 .../tests/numeric/should_compile/T7116.stdout      |   8 +-
 .../tests/simplCore/should_compile/T13143.stderr   |   4 +-
 .../tests/simplCore/should_compile/T13543.stderr   |  11 +-
 .../tests/simplCore/should_compile/T3772.stdout    |   4 +-
 .../tests/simplCore/should_compile/T4930.stderr    |   4 +-
 .../simplCore/should_compile/spec-inline.stderr    |   4 +-
 testsuite/tests/stranal/should_compile/Makefile    |   5 +
 testsuite/tests/stranal/should_compile/T16029.hs   |  12 ++
 .../tests/stranal/should_compile/T16029.stdout     |  11 ++
 testsuite/tests/stranal/should_compile/all.T       |   2 +
 testsuite/tests/stranal/sigs/HyperStrUse.stderr    |   4 +-
 testsuite/tests/stranal/sigs/T12370.stderr         |   8 +-
 testsuite/tests/stranal/sigs/T8598.stderr          |   4 +-
 17 files changed, 258 insertions(+), 190 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 d77501cd5b9060e38acd50e11e0c5aae89d75b65


More information about the ghc-commits mailing list