summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix LLVM version check yet againwip/backport-T16912Ömer Sinan Ağacan2019-10-224-47/+52
| | | | | | | | | | | | | | | | | There were two problems with LLVM version checking: - The parser would only parse x and x.y formatted versions. E.g. 1.2.3 would be rejected. - The version check was too strict and would reject x.y formatted versions. E.g. when we support version 7 it'd reject 7.0 ("LLVM version 7.0") and only accept 7 ("LLVM version 7"). We now parse versions with arbitrarily deep minor numbering (x.y.z.t...) and accept versions as long as the major version matches the supported version (e.g. 7.1, 7.1.2, 7.1.2.3 ...). (cherry picked from commit bf9dfe1ca32270f5e946e0f8ac1bb97184de6e4c)
* gitlab-ci: Fix URL of Darwin's cabal-install tarballBen Gamari2019-10-092-1/+2
| | | | | | | This was inadvertently referring to the cabal-install-latest/ directory which is volatile. (cherry picked from commit fc746e98d8ee7ac22224ba7d7fd1c38e16dfad30)
* Bump hsc2hs submodule to final 0.68.6 tagwip/ghc-8.8-finalizationBen Gamari2019-08-261-0/+0
|
* Restore bytestring submodule to 0.10.10.0Ben Gamari2019-08-261-0/+0
| | | | This was inadvertently reverted in 0bce423c016a02a0e384378eb729ffeb79df005b
* relnotes: Clarify reference to VKABen Gamari2019-08-261-1/+1
|
* gitlab-ci: Propagate BUILD_PROF_LIBS to make on Windowsghc-8.8.1-releaseBen Gamari2019-08-251-3/+7
| | | | Ensures that #15934 doesn't break the 32-bit Windows release build.
* Bump hsc2hs submoduleBen Gamari2019-08-251-0/+0
|
* gitlab-ci: Don't build PDF user's guide on AArch64Ben Gamari2019-08-221-0/+2
| | | | | | | For reasons I don't understand sphinx seems to fail to produce a .idx file for makeindex. (cherry picked from commit 9721b40db9b87c0135613649f9f1e129eb49795b)
* gitlab-ci: Bump Docker images revisionBen Gamari2019-08-211-1/+1
|
* SetLevels: Don't set context level when floating casesBen Gamari2019-08-211-4/+2
| | | | | | When floating a single-alternative case we previously would set the context level to the level where we were floating the case. However, this is not what FloatOut did: it rather left
* testsuite: Add cut-down test for #16978Ben Gamari2019-08-212-0/+19
|
* rts: Do not traverse nursery for dead closures in LDV profileMatthew Pickering2019-08-211-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is important that `heapCensus` and `LdvCensusForDead` traverse the same areas. `heapCensus` increases the `not_used` counter which tracks how many closures are live but haven't been used yet. `LdvCensusForDead` increases the `void_total` counter which tracks how many dead closures there are. The `LAG` is then calculated by substracting the `void_total` from `not_used` and so it is essential that `not_used >= void_total`. This fact is checked by quite a few assertions. However, if a program has low maximum residency but allocates a lot in the nursery then these assertions were failing (see #16753 and #15903) because `LdvCensusForDead` was observing dead closures from the nursery which totalled more than the `not_used`. The same closures were not counted by `heapCensus`. Therefore, it seems that the correct fix is to make `LdvCensusForDead` agree with `heapCensus` and not traverse the nursery for dead closures. Fixes #16100 #16753 #15903 #8982 (cherry picked from commit 1dc61c1ae7b80822612844d760eaebe6eb1f0ed4)
* rts: Correct assertion in LDV_recordDeadMatthew Pickering2019-08-211-1/+1
| | | | | | | It is possible that void_total is exactly equal to not_used and the other assertions for this check for <= rather than <. (cherry picked from commit a196d9c391aa488d58fb3d787637c6c0402958cb)
* rts: Correct handling of LARGE ARR_WORDS in LDV profilerMatthew Pickering2019-08-213-19/+20
| | | | | | | | | | | This implements the correct fix for #11627 by skipping over the slop (which is zeroed) rather than adding special case logic for LARGE ARR_WORDS which runs the risk of not performing a correct census by ignoring any subsequent blocks. This approach implements similar logic to that in Sanity.c (cherry picked from commit 808a87ff9be4d92d3124c7d70104f6a339880021)
* Fix erroneous float in CoreOptSimon Peyton Jones2019-08-214-3/+60
| | | | | | | | | | | | | The simple optimiser was making an invalid transformation to join points -- yikes. The fix is easy. I also added some documentation about the fact that GHC uses a slightly more restrictive version of join points than does the paper. Fix #16918 (cherry picked from commit d2e290d3280841647354ddf5ca9abdd974bce0d5)
* Minor refactoring in CoreSimplÖmer Sinan Ağacan2019-08-211-3/+0
| | | | | | | | When `join_ids` is empty `extendVarSetList existing_joins join_ids` is already no-op, so no need to check whether `join_ids` is empty or not before extending the joins set. (cherry picked from commit 897a59a5c0a08985ddccf00a4961cc2d080324e8)
* Release GHC 8.8.1Ben Gamari2019-08-211-2/+2
|
* Bump Cabal submodule to 3.0Ben Gamari2019-08-211-0/+0
|
* users-guide: Note TTGBen Gamari2019-08-211-0/+1
|
* gitlab-ci: Manually set SPHINXBUILD on WindowsBen Gamari2019-08-211-0/+1
| | | | | | | | | For some reason configure seems unable to find it on its own. Let's try giving it a hint. Addresses #16398. (cherry picked from commit 7e404afd7c923bf275093c7fa1b278d484cfdd82)
* Don't float unlifted join points to top levelSimon Peyton Jones2019-08-211-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket #16978 showed that we were floating a recursive, unlifted join point to top level. It's very much a corner case: joinrec j :: Int# j = jump j in ... But somehow it showed up in a real program. For non-recursive bindings in SetLevels.lvlBind we were already (correctly) checking for unlifted bindings, but when I wrote that code I didn't think that a /recursive/ binding could be unlifted but /join-points/ can be! Actually I don't think that SetLevels should be floating join points at all. SetLevels really floats things to move stuff out of loops and save allocation; but none of that applies to join points. The only reason to float join points is in cases like join j1 x = join j2 y = ... in ... which we might want to swizzle to join j2 x y = ... in join j1 x = ... in ... because now j1 looks small and might be inlined away altogether. But this is a very local float perhaps better done in the simplifier. Still: this patch fixes the crash, and does so in a way that is harmless if/when we change our strategy for floating join points. (cherry picked from commit 7d8d0012acd8701c0bb562376fd8321009342dcd)
* testsuite: Add testsuite for #16978Ben Gamari2019-08-212-0/+30
| | | | (cherry picked from commit 3b31a94df4cf7e55d93dfcad9b96d0f49f4d3f8d)
* Add test for #16893Ömer Sinan Ağacan2019-08-213-0/+93
|
* base: Don't inline eqTypeRepBen Gamari2019-08-211-1/+3
| | | | | | Issue #16893 reveals that the unsafeCoercion# in eqTypeRep can float in a way that compromises type safety. A real solution for this sadly won't be ready for 8.10 so this is a stop-gap measure for 8.8.
* Apply a missing substitution in mkEtaWW (#16979)Simon Peyton Jones2019-08-094-8/+287
| | | | | | | | | | | The `mkEtaWW` case for newtypes forgot to apply the substitution to the newtype coercion, resulting in the Core Lint errors observed in #16979. Easily fixed. Fixes #16979. Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com> (cherry picked from commit 2829f6dab5e860e61dba970a536709380c9d993d)
* Revert "Make scanr a good producer and consumer"Ben Gamari2019-08-063-19/+4
| | | | | | | | This reverts commit 4e1dfc3767167dddd0e151a2df8305b12aa0f49c. Due to #16943. (cherry picked from commit bbdd2c9677ff608873e7eaba984c43fafb8d7273)
* Add _GLOBAL_OFFSET_TABLE_ supportMoritz Angermann2019-08-053-6/+45
| | | | | | | | | This adds lookup logic for _GLOBAL_OFFSET_TABLE_ as well as relocation logic for R_ARM_BASE_PREL and R_ARM_GOT_BREL which the gnu toolchain (gas, gcc, ...) prefers to produce. Apparently recent llvm toolchains will produce those as well. (cherry picked from commit 826939387be69b100461dd553937dfea729b15ef)
* Fix #8487: Debugger confuses variablesRoland Senn2019-08-057-13/+79
| | | | | | | | | | | | To display the free variables for a single breakpoint, GHCi pulls out the information from the fields `modBreaks_breakInfo` and `modBreaks_vars` of the `ModBreaks` data structure. For a specific breakpoint this gives 2 lists of types 'Id` (`Var`) and `OccName`. They are used to create the Id's for the free variables and must be kept in sync: If we remove an element from the Names list, then we also must remove the corresponding element from the OccNames list. (cherry picked from commit 32be44613fed3fa7bff7190381acbdaa8ea15cfc)
* Bump text submodule to 1.2.4.0-rcBen Gamari2019-08-053-7/+7
|
* gitlab-ci: Fix i386 buildsBen Gamari2019-08-042-7/+24
| | | | It looks like this was an incomplete cherry-pick.
* Fix T16916 CI failures (#16966), comment amendmentsIvan Kasatenko2019-08-021-1/+1
| | | | | Backport of the master changes to the comment to prevent merge conflicts.
* Fix T16916 CI failures (#16966)Ivan Kasatenko2019-07-231-4/+8
| | | | | | | | | 1. Slightly increased the waiting time for the tested effect to be more profound. 2. Introduced measuring of the actual time spent waiting and adjusing CPU time by it to compensate for threadDelay waiting time inconsistencies.
* Do not ignore events deletion when events to be added are provided (#16916)Ivan Kasatenko2019-07-234-4/+51
| | | | | | | | | | | Kqueue/kevent implementation used to ignore events to be unsubscribed from when events to be subscribed to were provided. This resulted in a lost notification subscription, when GHC runtime didn't listen for any events, yet the kernel considered otherwise and kept waking up the IO manager thread. This commit fixes this issue by always adding and removing all of the provided subscriptions.
* gitlab-ci: Fix source tarball jobghc-8.8.1-rc1Ben Gamari2019-07-211-1/+3
| | | | | | | | | | * Use show! in source tarball job. Since we aren't actually building anything in this job `show` won't work. * Fix Docker image name * Make `version` file contain only version string
* Bump Cabal submodule to 3.0.0.0-rc3Ben Gamari2019-07-214-3/+3
|
* ghc-cabal: Use fromFlagOrDefault instead of fromFlagBen Gamari2019-07-201-2/+2
| | | | | As fromFlag is partial. The only case where we used fromFlag is when determining whether to strip libraries; we now assume that we shouldn't.
* llvm-targets: Synchronize against masterBen Gamari2019-07-201-4/+6
|
* integer-simple: Add changelogBen Gamari2019-07-202-0/+7
|
* Bump Cabal submodule to 3.0.0.0-rc2Ben Gamari2019-07-202-0/+6
|
* Bump bytestring submodule to 0.10.10.0Ben Gamari2019-07-151-0/+0
|
* Bump bytestring submoduleBen Gamari2019-07-131-0/+0
| | | | This will hopefully become release 0.10.8.3.
* Merge branch 'wip/ghc-8.8-merges' into ghc-8.8Ben Gamari2019-07-04208-982/+2029
|\
| * Bump parsec submodule to 3.1.14.0wip/ghc-8.8-mergesBen Gamari2019-07-041-0/+0
| |
| * Disable fragile test cases: T14697 T5559 T3424Vladislav Zavialov2019-07-013-6/+15
| | | | | | | | | | | | See Trac #15072, Trac #16349, Trac #16350 (cherry picked from commit 14586f5d737ec5dc828633267b50dcf0d47e1696)
| * Initial commit of dump-interfacesBen Gamari2019-07-011-0/+68
| | | | | | | | | | This is the initial commit of a utility that I have been using to compare the user-facing interfaces exposed by GHC across releases
| * Correct closure observation, construction, and mutation on weak memory machines.Travis Whitaker2019-06-3031-56/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here the following changes are introduced: - A read barrier machine op is added to Cmm. - The order in which a closure's fields are read and written is changed. - Memory barriers are added to RTS code to ensure correctness on out-or-order machines with weak memory ordering. Cmm has a new CallishMachOp called MO_ReadBarrier. On weak memory machines, this is lowered to an instruction that ensures memory reads that occur after said instruction in program order are not performed before reads coming before said instruction in program order. On machines with strong memory ordering properties (e.g. X86, SPARC in TSO mode) no such instruction is necessary, so MO_ReadBarrier is simply erased. However, such an instruction is necessary on weakly ordered machines, e.g. ARM and PowerPC. Weam memory ordering has consequences for how closures are observed and mutated. For example, consider a closure that needs to be updated to an indirection. In order for the indirection to be safe for concurrent observers to enter, said observers must read the indirection's info table before they read the indirectee. Furthermore, the entering observer makes assumptions about the closure based on its info table contents, e.g. an INFO_TYPE of IND imples the closure has an indirectee pointer that is safe to follow. When a closure is updated with an indirection, both its info table and its indirectee must be written. With weak memory ordering, these two writes can be arbitrarily reordered, and perhaps even interleaved with other threads' reads and writes (in the absence of memory barrier instructions). Consider this example of a bad reordering: - An updater writes to a closure's info table (INFO_TYPE is now IND). - A concurrent observer branches upon reading the closure's INFO_TYPE as IND. - A concurrent observer reads the closure's indirectee and enters it. (!!!) - An updater writes the closure's indirectee. Here the update to the indirectee comes too late and the concurrent observer has jumped off into the abyss. Speculative execution can also cause us issues, consider: - An observer is about to case on a value in closure's info table. - The observer speculatively reads one or more of closure's fields. - An updater writes to closure's info table. - The observer takes a branch based on the new info table value, but with the old closure fields! - The updater writes to the closure's other fields, but its too late. Because of these effects, reads and writes to a closure's info table must be ordered carefully with respect to reads and writes to the closure's other fields, and memory barriers must be placed to ensure that reads and writes occur in program order. Specifically, updates to a closure must follow the following pattern: - Update the closure's (non-info table) fields. - Write barrier. - Update the closure's info table. Observing a closure's fields must follow the following pattern: - Read the closure's info pointer. - Read barrier. - Read the closure's (non-info table) fields. This patch updates RTS code to obey this pattern. This should fix long-standing SMP bugs on ARM (specifically newer aarch64 microarchitectures supporting out-of-order execution) and PowerPC. This fixes issue #15449. Co-Authored-By: Ben Gamari <ben@well-typed.com> (cherry picked from commit 11bac11545b19a63f5cec3c5bbd5c3f9a7dae0b2)
| * Fix GCC warnings with __clear_cache builtin (#16867)Sylvain Henry2019-06-301-6/+8
| | | | | | | | (cherry picked from commit 4ec233ecfc7f061c19d0c5ef98ad05719b1161e7)
| * Fix Happy deps for Stack (#16825)Sylvain Henry2019-06-301-10/+5
| | | | | | | | (cherry picked from commit 90e0ab7d80d88463df97bc3514fc89d2ab9fcfca)
| * getExecutablePath: get path from sysctl on FreeBSDFraser Tweedale2019-06-301-0/+47
| | | | | | | | (cherry picked from commit d35cec7a9c07a0fc3b40e45d64e5794c3567a523)
| * typo in the docs for DynFlags.hsArtem Pelenitsyn2019-06-301-1/+1
| | | | | | | | (cherry picked from commit ef6d9a50db115e296d2d9bec3e94c7369f1d504c)