[commit: ghc] master: Drop dead Given bindings in setImplicationStatus (954cbc7)

git at git.haskell.org git at git.haskell.org
Thu Jan 4 17:41:06 UTC 2018


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

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

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

commit 954cbc7c106a20639960f55ebb85c5c972652d41
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 4 12:32:13 2018 +0000

    Drop dead Given bindings in setImplicationStatus
    
    Trac #13032 pointed out that we sometimes generate unused
    bindings for Givens, and (worse still) we can't always discard
    them later (we don't drop a case binding unless we can prove
    that the scrutinee is non-bottom.
    
    It looks as if this may be a major reason for the performace
    problems in #14338 (see comment:29).
    
    This patch fixes the problem at source, by pruning away all the
    dead Givens.  See Note [Delete dead Given evidence bindings]
    
    Remarkably, compiler allocation falls by 23% in
    perf/compiler/T12227!
    
    I have not confirmed whether this change actualy helps with


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

954cbc7c106a20639960f55ebb85c5c972652d41
 compiler/basicTypes/VarEnv.hs                      |   5 +-
 compiler/typecheck/TcEvidence.hs                   |   7 +-
 compiler/typecheck/TcInstDcls.hs                   |  33 ++-
 compiler/typecheck/TcRnMonad.hs                    |   6 +-
 compiler/typecheck/TcRnTypes.hs                    |  46 +++-
 compiler/typecheck/TcSMonad.hs                     |  36 ++-
 compiler/typecheck/TcSimplify.hs                   | 247 ++++++++++++---------
 compiler/typecheck/TcUnify.hs                      |  17 +-
 .../indexed-types/should_compile/T7837.stderr      |   1 -
 testsuite/tests/perf/compiler/all.T                |   3 +-
 .../tests/simplCore/should_compile/T4398.stderr    |  18 +-
 testsuite/tests/typecheck/should_compile/T13032.hs |  12 +
 .../tests/typecheck/should_compile/T13032.stderr   |  20 ++
 testsuite/tests/typecheck/should_compile/all.T     |   1 +
 14 files changed, 270 insertions(+), 182 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 954cbc7c106a20639960f55ebb85c5c972652d41


More information about the ghc-commits mailing list