[commit: ghc] wip/ghc-8.0-det: Kill non-deterministic foldUFM in TrieMap and TcAppMap (6e94424)

git at git.haskell.org git at git.haskell.org
Mon Jul 18 17:58:00 UTC 2016


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

On branch  : wip/ghc-8.0-det
Link       : http://ghc.haskell.org/trac/ghc/changeset/6e94424e015e9a3765a08a75e07463f559141987/ghc

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

commit 6e94424e015e9a3765a08a75e07463f559141987
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Wed May 4 09:22:37 2016 -0700

    Kill non-deterministic foldUFM in TrieMap and TcAppMap
    
    Summary:
    foldUFM introduces unnecessary non-determinism that actually
    leads to different generated code as explained in
    Note [TrieMap determinism].
    
    As we're switching from UniqFM to UniqDFM here you might be
    concerned about performance. There's nothing that ./validate
    detects. nofib reports no change in Compile Allocations, but
    Compile Time got better on some tests and worse on some,
    yielding this summary:
    
            -1 s.d.                -----            -3.8%
            +1 s.d.                -----            +5.4%
            Average                -----            +0.7%
    
    This is not a fair comparison as the order of Uniques
    changes what GHC is actually doing. One benefit from making
    this deterministic is also that it will make the
    performance results more stable.
    
    Full nofib results: P108
    
    Test Plan: ./validate, nofib
    
    Reviewers: goldfire, simonpj, simonmar, austin, bgamari
    
    Reviewed By: simonpj
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2169
    
    GHC Trac Issues: #4012


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

6e94424e015e9a3765a08a75e07463f559141987
 compiler/basicTypes/NameEnv.hs                     |  24 ++++
 compiler/basicTypes/VarEnv.hs                      |   8 ++
 compiler/coreSyn/TrieMap.hs                        | 132 ++++++++++++++++-----
 compiler/typecheck/TcSMonad.hs                     |  28 +++--
 .../tests/ghc-api/apirecomp001/apirecomp001.stderr |  16 +--
 .../indexed-types/should_compile/T3017.stderr      |   2 +-
 testsuite/tests/parser/should_compile/T2245.stderr |   8 +-
 .../should_compile/ExtraConstraints1.stderr        |   6 +-
 .../should_compile/ExtraConstraints3.stderr        |  32 ++---
 .../WarningWildcardInstantiations.stderr           |   2 +-
 .../InstantiatedNamedWildcardsInConstraints.stderr |   2 +-
 .../should_fail/WildcardInstantiations.stderr      |   2 +-
 testsuite/tests/rebindable/rebindable6.stderr      |  17 +--
 .../tests/typecheck/should_compile/T10971a.stderr  |   6 +-
 testsuite/tests/typecheck/should_fail/T5300.stderr |   4 +-
 testsuite/tests/typecheck/should_fail/T5853.stderr |  29 +++--
 .../tests/typecheck/should_fail/tcfail171.stderr   |   4 +-
 .../tests/typecheck/should_fail/tcfail204.stderr   |   9 +-
 .../tests/warnings/should_compile/PluralS.stderr   |   7 +-
 19 files changed, 220 insertions(+), 118 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 6e94424e015e9a3765a08a75e07463f559141987


More information about the ghc-commits mailing list