[commit: ghc] master: Zap usage info in CSE (Trac #10218) (d261d4c)

git at git.haskell.org git at git.haskell.org
Tue Apr 14 12:13:42 UTC 2015


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

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

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

commit d261d4cbcc867405f71d7c9580628f52978e2267
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Apr 14 09:20:42 2015 +0100

    Zap usage info in CSE (Trac #10218)
    
    Trac #10218 reports a subtle bug that turned out to be:
    
    - CSE invalidated the usage information computed
      by earlier demand analysis, by increasing sharing
    
    - that made a single-entry thunk into a multi-entry thunk
    
    - and with -feager-blackholing, that led to <<loop>>
    
    The patch fixes it by making the CSE pass zap usage information for
    let-bound identifiers.   It can be restored by -flate-dmd-anal.
    
    (But making -flate-dmd-anal the default needs some careful work;
    see Trac #7782.)


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

d261d4cbcc867405f71d7c9580628f52978e2267
 compiler/basicTypes/Demand.hs                      | 33 +++++++++++++-------
 compiler/basicTypes/Id.hs                          | 10 +++++--
 compiler/basicTypes/IdInfo.hs                      |  8 +++--
 compiler/simplCore/CSE.hs                          | 35 ++++++++++++++--------
 compiler/simplCore/SetLevels.hs                    |  2 +-
 compiler/stranal/DmdAnal.hs                        |  4 +--
 .../tests/simplCore/should_compile/EvalTest.hs     |  2 +-
 testsuite/tests/stranal/should_run/T10218.hs       | 18 +++++++++++
 .../should_run/T10218.stdout}                      |  1 -
 testsuite/tests/stranal/should_run/all.T           |  1 +
 10 files changed, 82 insertions(+), 32 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 d261d4cbcc867405f71d7c9580628f52978e2267


More information about the ghc-commits mailing list