[commit: ghc] master: Kill non-deterministic foldUFM in TrieMap and TcAppMap (ad4392c)

git at git.haskell.org git at git.haskell.org
Wed May 4 17:16:37 UTC 2016


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

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

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

commit ad4392c142696d5092533480a82ed65322e9d413
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


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

ad4392c142696d5092533480a82ed65322e9d413
 compiler/basicTypes/NameEnv.hs                     |  24 ++++
 compiler/basicTypes/VarEnv.hs                      |   8 ++
 compiler/coreSyn/TrieMap.hs                        | 132 ++++++++++++++++-----
 compiler/typecheck/TcSMonad.hs                     |  28 +++--
 testsuite/tests/ado/ado004.stderr                  |   4 +-
 .../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 +-
 20 files changed, 222 insertions(+), 120 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 ad4392c142696d5092533480a82ed65322e9d413


More information about the ghc-commits mailing list