summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Testsuite driver: always quote opts.testdirwip/thomieThomas Miedema2016-06-075-23/+29
| | | | | This makes sure the testsuite keeps working when testdir contains backward slashes.
* Use pprUFM in pprStgLVsBartosz Nitka2016-06-071-1/+2
|
* Kill varSetElemsBartosz Nitka2016-06-074-9/+14
| | | | | | | | This eradicates varSetElems from the codebase. This function used to introduce nondeterminism. I've also documented benign nondeterminism in three places. GHC Trac: #4012
* Make vectInfoParallelVars a DVarSetBartosz Nitka2016-06-078-17/+19
| | | | | | | | | | | | | | | | We dump it in the interface file, so we need to do it in a deterministic order. I haven't seen any problems with this during my testing, but that's probably because it's unused. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2313 GHC Trac Issues: #4012
* Document determinism in pprintClosureCommandBartosz Nitka2016-06-071-1/+4
| | | | | | Like described in the comment, it's OK here. GHC Trac: #4012
* Use DVarSet in Vectorise.ExpBartosz Nitka2016-06-071-27/+26
| | | | | | | | | | | | | | | | I believe this part of code is a bit unused. That's probably why it never became a problem in my testing. I'm changing to deterministic sets here to be safer. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2312 GHC Trac Issues: #4012
* Kill varSetElems in checkValidInferredKindsBartosz Nitka2016-06-071-1/+4
| | | | | | It's only used for producing an error message here GHC Trac: #4012
* Fix build by removing unused importBartosz Nitka2016-06-071-1/+0
|
* Kill two instances of uniqSetToListBartosz Nitka2016-06-072-10/+10
| | | | | | | There should be no performance impact of switching to the deterministic set here. GHC Trac: #4012
* CoreToStg: Remove hand-written Eq instances of HowBound and LetInfoÖmer Sinan Ağacan2016-06-071-13/+3
|
* Use a deterministic map for imp_dep_modsBartosz Nitka2016-06-074-21/+20
| | | | | | | | | | | | | | | | | This lets us remove some normalization and makes it less brittle for the future. Test Plan: ./validate Reviewers: ezyang, austin, bgamari, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2311 GHC Trac Issues: #4012
* Kill occSetEltsBartosz Nitka2016-06-071-3/+1
| | | | | | It uses uniqSetToList which is nondeterministic. GHC Trac: #4012
* Merge MatchFixity and HsMatchContextAlan Zimmerman2016-06-0639-338/+459
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: MatchFixity was introduced to facilitate use of API Annotations. HsMatchContext does the same thing with more detail, but is chased through all over the place to provide context when processing a Match. Since we already have MatchFixity in the Match, it may as well provide the full context. updates submodule haddock Test Plan: ./validate Reviewers: austin, goldfire, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2271 GHC Trac Issues: #12105 (cherry picked from commit 306ecad591951521ac3f5888ca8be85bf749d271)
* Make UnitIdMap a deterministic mapBartosz Nitka2016-06-062-27/+33
| | | | | | | | | | | | | | | | | | | This impacts at least the order in which version macros are generated. It's pretty hard to track what kind of nondeterminism is benign and this should have no performance impact as the number of packages should be relatively small. Test Plan: ./validate Reviewers: simonmar, austin, bgamari, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2308 GHC Trac Issues: #4012
* Kill foldUniqSetBartosz Nitka2016-06-064-17/+24
| | | | | | | | | | | | | | | I planned to just say that we don't care about this part. Turns out I was able to document away the uses in the codegenerator. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2307 GHC Trac Issues: #4012
* Document putDictionary determinismBartosz Nitka2016-06-061-1/+3
| | | | | | | | | | | | | | Summary: Like explained in the comment it's OK here. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2306 GHC Trac Issues: #4012
* Kill nameSetElemsBartosz Nitka2016-06-061-3/+1
| | | | | | | | | | | | | | nameSetElems used `eltsUFM` which is nondeterministic. Test Plan: ./validate Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2305 GHC Trac Issues: #4012
* Desugar ApplicativeDo and RecDo deterministicallyBartosz Nitka2016-06-068-8/+118
| | | | | | | | | | | | | | | | | This fixes a problem described in Note [Deterministic ApplicativeDo and RecursiveDo desugaring]. Test Plan: ./validate + new testcase Reviewers: simonpj, bgamari, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2287 GHC Trac Issues: #4012
* Add @since annotations to base instancesSeraphime Kirkovski2016-06-0687-4/+1029
| | | | | | | | | | | | | | | | | | Add @since annotations to instances in `base`. Test Plan: * ./validate # some commets shouldn't break the build * review the annotations for absurdities. Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari Reviewed By: RyanGlScott, hvr, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2277 GHC Trac Issues: #11767
* Implement deterministic CallInfoSetBartosz Nitka2016-06-061-37/+74
| | | | | | | | | | | | | | | | | | | | | | | We need CallInfoSet to be deterministic because it determines the order that the binds get generated. Currently it's not deterministic because it's keyed on `CallKey = [Maybe Type]` and `Ord CallKey` is implemented with `cmpType` which is nondeterministic. See Note [CallInfoSet determinism] for more details. Test Plan: ./validate Reviewers: simonpj, bgamari, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2242 GHC Trac Issues: #4012
* Use UniqDFM for HomePackageTableBartosz Nitka2016-06-0610-49/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't strictly necessary for deterministic ABIs. The results of eltsHpt are consumed in two ways: 1) they determine the order of linking 2) if you track the data flow all the family instances get put in FamInstEnvs, so the nondeterministic order is forgotten. 3) same for VectInfo stuff 4) same for Annotations The problem is that I haven't found a nice way to do 2. in a local way and 1. is nice to have if we went for deterministic object files. Besides these maps are keyed on ModuleNames so they should be small relative to other things and the overhead should be negligible. As a bonus we also get more specific names. Test Plan: ./validate Reviewers: bgamari, austin, hvr, ezyang, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2300 GHC Trac Issues: #4012
* Failing test-case for #12135.ghc-quick3Edward Z. Yang2016-06-057-0/+29
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Better comment for orIfNotFound.Edward Z. Yang2016-06-051-1/+5
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Testsuite: fixup comments for T9872d [skip ci]Thomas Miedema2016-06-051-2/+2
| | | | | | | Resolve confusion resulting from: * 6746549772c5cc0ac66c0fce562f297f4d4b80a2 (typo in 64 + 32 bit numbers) * ae86eb9f72fa7220fe47ac54d6d21395691c1308 (corrects 64 bit number) * 1a8d61ca1a54820d2bc30c6a964312faf76d0635 (corrects 32 bit number)
* Add relocation type R_X86_64_REX_GOTPCRELXTamar Christina2016-06-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: Adding support for the `R_X86_64_REX_GOTPCRELX` relocation type. This relocation is treated by the linker the same as the `R_X86_64_GOTPCRELX` type `G + GOT + A - P` to generate relative offsets to the GOT. The `REX` prefix has no influence in this stage. This is based on https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r252.pdf Test Plan: ./validate Reviewers: erikd, austin, bgamari, simonmar Reviewed By: erikd Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2303 GHC Trac Issues: #12147
* Replace hand-written Bounded instances with derived onesRyan Scott2016-06-045-136/+58
| | | | | | | | | | | | | | | | | Summary: The spiritual successor to D2291, since deriving `Bounded` instances in `GHC.Enum` wasn't possible prior to changes made in that Diff. This Diff finds every manually implemented `Bounded` instance in `base` that is completely equivalent to the derived instances, and replaces it. Reviewers: bgamari, goldfire, austin, hvr Reviewed By: austin, hvr Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2301
* Refactor the SymbolName and SymbolAddr types to be pointersTamar Christina2016-06-042-49/+49
| | | | | | | | | | | | | | | | | | | | | | | Take the pointer notation out of the typedef such that it preserves the fact that these are pointers at the use site. Test Plan: ./validate on all platforms that use the runtime linker. For unix platforms please ensure `DYNAMIC_GHC_PROGRAMS=NO` is added to your validate file. Continuation of D2250 Reviewers: austin, bgamari, simonmar, erikd Reviewed By: erikd Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2302 GHC Trac Issues: #11816
* Rename isPinnedByteArray# to isByteArrayPinned#Ben Gamari2016-06-047-11/+48
| | | | | | | | | | | | Reviewers: simonmar, duncan, erikd, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2290 GHC Trac Issues: #12059
* RTS SMP: Use compiler built-ins on all platforms.Peter Trommler2016-06-043-166/+40
| | | | | | | | | | | | | | | | | | | Use C compiler builtins for atomic SMP primitives. This saves a lot of CPP ifdefs. Add test for atomic xchg: Test if __sync_lock_test_and_set() builtin stores the second argument. The gcc manual says the actual value stored is implementation defined. Test Plan: validate and eyeball generated assembler code Reviewers: kgardas, simonmar, hvr, bgamari, austin, erikd Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2233
* PrelInfo: Ensure that tuple promoted datacon names are in knownKeyNamesBen Gamari2016-06-044-4/+7
| | | | | | | | | | | | | | | | | Previously the promoted datacons of the boxed tuple types were not included in knownKeyNames, which lead to #12132. Test Plan: Test with included TypeOf testcase Reviewers: austin, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2279 GHC Trac Issues: #12132
* integer-gmp: Make minusInteger more efficientAlan Mock2016-06-046-5/+81
| | | | | | | | | | | | | | | | Give `minusInteger` its own implementation. Previously `minusInteger` used `plusInteger` and `negateInteger`, which meant it always allocated. Now it works more like `plusInteger`. Reviewers: goldfire, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2278 GHC Trac Issues: #12129
* Use useful names for Symbol Addr and Names in Linker.cTamar Christina2016-06-032-54/+57
| | | | | | | | | | | | | | | | | | | | | | | | Replace `char*` and `void*` with `SymbolName` and `SymbolAddr` in `Linker.c`. Gives some useful information about what the variables are used for and also normalizes the types used in Mac, Linux and Windows Test Plan: ./validate on all platforms that use the runtime linker. For unix platforms please ensure `DYNAMIC_GHC_PROGRAMS=NO` is added to your validate file. This is a continuation from D2184 Reviewers: austin, erikd, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2250 GHC Trac Issues: #11816
* Refactored SymbolInfo to lower memory usage in RTSTamar Christina2016-06-035-76/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously as part of #11223 a new struct `SymbolInfo` was introduced to keep track it the weak symbol status of a symbol. This structure also kept a copy of the calculated address of the symbol which turns out was useful in ignoring non-weak zero-valued symbols. The information was kept in an array so it means for every symbol two extra bytes were kept even though the vast majority of symbols are non-weak and non-zero valued. This changes the array into a sparse map keeping this information only for the symbols that are weak or zero-valued. This allows for a reduction in the amount of information needed to be kept while giving up a small (negligable) hit in performance as this information now has to be looked up in hashmaps. Test Plan: ./validate on all platforms that use the runtime linker. For unix platforms please ensure `DYNAMIC_GHC_PROGRAMS=NO` is added to your validate file. Reviewers: simonmar, austin, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2184 GHC Trac Issues: #11816
* testsuite: Mark broken tests on powerpc64lePeter Trommler2016-06-0311-18/+31
| | | | | | | | | | | | | | | | | | Mark all failing tests that have a ticket for powerpc64 as broken. Most of these failures are due to the lack of linker support in the runtime system. Test Plan: validate on powerpc and AIX Reviewers: erikd, bgamari, simonmar, hvr, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2289 GHC Trac Issues: #11261, #11259, #11260, #11323
* Derive instances in Data.DataRyan Scott2016-06-032-703/+69
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, none of the `Data` instances in `Data.Data` are derived, which has resulted in hundreds of lines of laboriously hand-written `Data` instances. This cleans it up by using `DeriveDataTypeable` to derive all of the boring instances. Note that previously, `tcTopSrcDecls` in `TcRnDriver` was typechecking the variables generated in `deriving` statements before other top-level variables, which causes an error when `DeriveDataTypeable` is used in `Data.Data`, since the `deriving`-generated variable definitions refer to top-level definitions in `Data.Data` itself. To fix this, the order in which these two groups are typechecked was reversed. Test Plan: ./validate Reviewers: rwbarton, bgamari, hvr, austin Reviewed By: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D2291
* Document putSymbolTable determinismBartosz Nitka2016-06-031-1/+3
| | | | | | | | | | | | | | | | Like explained in the comment it's OK here. Test Plan: ./validate Reviewers: bgamari, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2298 GHC Trac Issues: #4012
* Make FieldLabelEnv a deterministic setBartosz Nitka2016-06-035-18/+41
| | | | | | | | | | | | | | | | | | This lets us kill fsEnvElts function which is nondeterministic. We also get better guarantees than just comments. We don't do lookups, but I believe a set is needed for deduplication. Test Plan: ./validate Reviewers: bgamari, mpickering, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2297 GHC Trac Issues: #4012
* HscMain: Minor simplificationÖmer Sinan Ağacan2016-06-031-3/+2
|
* Whitespace onlyÖmer Sinan Ağacan2016-06-031-3/+3
|
* Kill nameSetElems in rnCmdTopBartosz Nitka2016-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | This change isn't necessary for determinism. appAName, choiceAName, loopAName all have pre-allocated Uniques and their relative order can't change. I opted to use nameSetElemsStable here because: * the cost is negligible * it's less fragile than just documenting Test Plan: ./validate Reviewers: simonpj, austin, bgamari, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2292 GHC Trac Issues: #4012
* Kill nameSetElems in findImportUsageBartosz Nitka2016-06-021-1/+1
| | | | | | | | | | | | | | | | | nameSetElems is nondeterministic and while I think we don't need determinism here it doesn't hurt. Test Plan: ./validate Reviewers: ezyang, bgamari, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2293 GHC Trac Issues: #4012
* Use UniqDSet for finding free names in the LinkerBartosz Nitka2016-06-022-8/+10
| | | | | | | | | | | | | | | | | | This is not necessary for determinism, but it's a choice between making this deterministic and using `nonDetEltsUFM` and a comment explaining that it doesn't matter. Test Plan: ./validate Reviewers: austin, hvr, bgamari, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2295 GHC Trac Issues: #4012
* Remove dead generics-related code from OccNameRyan Scott2016-06-021-27/+2
| | | | | | | | Before #9766 was fixed, GHC would generate auxiliary datatypes for every Generic instance, and it would use functions from OccName to prefix the generated names. GHC no longer generates any auxiliary datatypes for Generic instances, but the accompanying code was never removed from OccName (until now).
* Add nameSetElemsStable and fix the buildBartosz Nitka2016-06-021-1/+11
|
* Serialize vParallelTyCons in a stable orderBartosz Nitka2016-06-021-1/+1
| | | | | | | | | | | | | | | | | | nameSetElems can introduce nondeterminism and while I haven't observed this being a problem in practice (possibly because this is dead code) there's no downside to doing this. Test Plan: ./validate Reviewers: bgamari, austin, simonpj, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2296 GHC Trac Issues: #4012
* Localize orphan-related nondeterminismBartosz Nitka2016-06-024-8/+11
| | | | | | | | | | | | | | | chooseOrphanAnchor now takes a NameSet, relieving the callers from the burden of converting it to a list Test Plan: ./validate Reviewers: bgamari, ezyang, austin, simonmar, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2294 GHC Trac Issues: #4012
* Travis: llvm's apt repository is offlineThomas Miedema2016-06-021-2/+4
|
* Testsuite: run tests in /tmp/ghctest-xxx instead of /tmp/ghctest/xxxThomas Miedema2016-06-021-15/+1
| | | | | | | This fixes a bug of not being able to create files or directories in /tmp/ghctest if it was created by a different user. Trac ticket #11980.
* Kill nameSetElems in getInfoBartosz Nitka2016-06-021-1/+1
| | | | nameSetAll is more precise here
* Improve failed knot-tying error message.Edward Z. Yang2016-06-024-6/+31
| | | | | | | | | | | | Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2207