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

git at git.haskell.org git at git.haskell.org
Thu Jul 14 13:53:06 UTC 2016


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

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

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

commit 806457482330a1bf660c92e71a6aff0fb62b16c2
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


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

806457482330a1bf660c92e71a6aff0fb62b16c2
 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 806457482330a1bf660c92e71a6aff0fb62b16c2


More information about the ghc-commits mailing list