[GHC] #4012: Compilation results are not deterministic

GHC ghc-devs at haskell.org
Thu Oct 22 14:18:29 UTC 2015


#4012: Compilation results are not deterministic
-------------------------------------+-------------------------------------
        Reporter:  kili              |                Owner:  niteria
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  6.12.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10424            |  Differential Rev(s):  Phab:D910,
                                     |  Phab:D1073, Phab:D1133, Phab:D1192,
       Wiki Page:                    |  Phab:D1268
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"9cb192ce4b34a472041010df9c30f5d741eb0261/ghc"
 9cb192ce/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="9cb192ce4b34a472041010df9c30f5d741eb0261"
 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4012#comment:126>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list