[GHC] #4012: Compilation results are not deterministic

GHC ghc-devs at haskell.org
Sat Nov 21 16:15:34 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,
                                     |  Phab:D1268, Phab:D1360, Phab:D1373,
                                     |  Phab:D1396, Phab:D1457, Phab:D1468,
       Wiki Page:                    |  Phab:D1487, Phab:D1504, Phab:D1508
-------------------------------------+-------------------------------------

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

 In [changeset:"2325bd4e0fad0e5872556c5a78d1a6a1873e7201/ghc" 2325bd4/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2325bd4e0fad0e5872556c5a78d1a6a1873e7201"
 Create a deterministic version of tyVarsOfType

 I've run into situations where I need deterministic `tyVarsOfType` and
 this implementation achieves that and also brings an algorithmic
 improvement.  Union of two `VarSet`s takes linear time the size of the
 sets and in the worst case we can have `n` unions of sets of sizes
 `(n-1, 1), (n-2, 1)...` making it quadratic.

 One reason why we need deterministic `tyVarsOfType` is in `abstractVars`
 in `SetLevels`. When we abstract type variables when floating we want
 them to be abstracted in deterministic order.

 Test Plan: harbormaster

 Reviewers: simonpj, goldfire, austin, hvr, simonmar, bgamari

 Reviewed By: simonmar

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D1468

 GHC Trac Issues: #4012
 }}}

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


More information about the ghc-tickets mailing list