[commit: ghc] master: Make stronglyConnCompFromEdgedVertices deterministic (9cb192c)

git at git.haskell.org git at git.haskell.org
Thu Oct 22 14:18:34 UTC 2015


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

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

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

commit 9cb192ce4b34a472041010df9c30f5d741eb0261
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Thu Oct 22 15:30:56 2015 +0200

    Make stronglyConnCompFromEdgedVertices deterministic
    
    This makes it so the result of computing SCC's depends on the order
    the nodes were passed to it, but not on the order on the user provided
    key type.
    The key type is usually `Unique` which is known to be nondeterministic.
    
    Test Plan:
    `text` and `aeson` become deterministic after this
    ./validate
    
    Compare compile time for `text`:
    ```
    $ cabal get text && cd text* && cabal sandbox init && cabal install
    --dependencies-only && time cabal build
    real    0m59.459s
    user    0m57.862s
    sys     0m1.185s
    $ cabal clean && time cabal build
    real    1m0.037s
    user    0m58.350s
    sys     0m1.199s
    $ cabal clean && time cabal build
    real    0m57.634s
    user    0m56.118s
    sys     0m1.202s
    $ cabal get text && cd text* && cabal sandbox init && cabal install
    --dependencies-only && time cabal build
    real    0m59.867s
    user    0m58.176s
    sys     0m1.188s
    $ cabal clean && time cabal build
    real    1m0.157s
    user    0m58.622s
    sys     0m1.177s
    $ cabal clean && time cabal build
    real    1m0.950s
    user    0m59.397s
    sys     0m1.083s
    ```
    
    Reviewers: ezyang, simonmar, austin, bgamari
    
    Reviewed By: simonmar, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1268
    
    GHC Trac Issues: #4012


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

9cb192ce4b34a472041010df9c30f5d741eb0261
 compiler/utils/Digraph.hs                          | 33 ++++++++++------------
 testsuite/tests/{ado => determinism}/Makefile      |  0
 testsuite/tests/determinism/all.T                  |  3 ++
 testsuite/tests/determinism/determinism001.hs      | 23 +++++++++++++++
 testsuite/tests/determinism/determinism001.stdout  |  4 +++
 .../indexed-types/should_compile/T7837.stderr      |  2 +-
 .../tests/numeric/should_compile/T7116.stdout      | 29 ++++++++++---------
 testsuite/tests/perf/compiler/all.T                |  3 +-
 .../tests/simplCore/should_compile/T8274.stdout    |  2 +-
 .../tests/simplCore/should_compile/T8848.stderr    | 18 ++++++------
 .../tests/stranal/should_compile/T10482a.stdout    |  2 +-
 11 files changed, 74 insertions(+), 45 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 9cb192ce4b34a472041010df9c30f5d741eb0261


More information about the ghc-commits mailing list