[GHC] #4012: Compilation results are not deterministic
GHC
ghc-devs at haskell.org
Tue Oct 27 14:17:56 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:"158d2a91581d82dc1690a858b474eaab3a02e43e/ghc" 158d2a9/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="158d2a91581d82dc1690a858b474eaab3a02e43e"
Make it possible to have different UniqSupply strategies
To get reproducible/deterministic builds, the way that the Uniques are
assigned shouldn't matter. This allows to test for that.
It add 2 new flags:
* `-dinitial-unique`
* `-dunique-increment`
And by varying these you can get interesting effects:
* `-dinitial-unique=0 -dunique-increment 1` - current sequential
UniqSupply
* `-dinitial-unique=16777215 -dunique-increment -1` - UniqSupply that
generates in decreasing order
* `-dinitial-unique=1 -dunique-increment PRIME` - where PRIME big enough
to overflow often - nonsequential order
I haven't proven the usefullness of the last one yet and it's the reason
why we have to mask the bits with `0xFFFFFF` in `genSym`, so I can
remove it if it becomes contentious.
Test Plan: validate on harbormaster
Reviewers: simonmar, austin, ezyang, bgamari
Reviewed By: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1360
GHC Trac Issues: #4012
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4012#comment:127>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list