summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* codeGen: Fix header size for array write barriersGHC GitLab CI2021-06-271-3/+3
| | | | | | | | | | | Previously the code generator's logic for invoking the nonmoving write barrier was inconsistent with the write barrier itself. Namely, the code generator treated the header size argument as being in words whereas the barrier expected bytes. This was the cause of #19715. Fixes #19715. (cherry picked from commit 221a104f44fdf58e4514d41ae827747c2bf938c8)
* linker: Replace one missed usage of Opt_RPath with useXLinkerRPathMatthew Pickering2021-06-251-1/+1
| | | | (cherry picked from commit f926ecfdcdf5468b8539bc8f4aad87404f1e397e)
* rts: move xxxHash out of the user namespaceTamar Christina2021-06-254-7/+25
| | | | (cherry picked from commit 74c874148fbea996cadf1d9fa50f2a44488dd82b)
* [aarch64-macho] Fix off-by-one error in the linkerMoritz Angermann2021-06-251-1/+11
| | | | | | | | We need to be careful about the sign bit for BR26 relocation otherwise we end up encoding a large positive number and reading back a large negative number. (cherry picked from commit d6ab9c60288369ec991826b158d751dd4cb3319e)
* ci: fix ci.sh by creating build.mk in one placeAdam Sandberg Ericsson2021-06-251-18/+2
| | | | | | | | | | | | | Previously `prepare_build_mk` created a build.mk that was overwritten right after. This makes the BIGNUM_BACKEND choice take effect, fixing #19953, and causing the metric increase below in the integer-simple job. Metric Increase: space_leak_001 (cherry picked from commit 87f57ecf2523e83d8dd9cad919a6f2010f630ad0)
* Various documentation fixesKrzysztof Gogolewski2021-06-254-10/+15
| | | | | | | | | | | | | * Remove UnliftedFFITypes from conf. Some time ago, this extension was undocumented and we had to silence a warning. This is no longer needed. * Use r'' in conf.py. This fixes a Sphinx warning: WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert docs/users_guide/conf.py to Python 3 syntax. * Mark GHCForeignImportPrim as documented * Fix formatting in template_haskell.rst * Remove 'recursive do' from the list of unsupported items in TH (cherry picked from commit 83407ffc7acc00cc025b9f6ed063add9ab9f9bcc)
* Linker/darwin: Properly honour -fno-use-rpathsMatthew Pickering2021-06-257-34/+74
| | | | | | | | | | | | | | | The specification is now simple * On linux, use `-Xlinker -rpath -Xlinker` to set the rpath of the executable * On darwin, never use `-Xlinker -rpath -Xlinker`, always inject the rpath afterwards, see `runInjectRPaths`. * If `-fno-use-rpaths` is passed then *never* inject anything into the rpath. Fixes #20004 (cherry picked from commit 6281a333303a4dbe75a97a87c17c0fbace5268f5)
* Set min LLVM version to 9 and make version checking use a non-inclusive upperZubin Duggal2021-06-255-17/+20
| | | | | | | | | bound. We use a non-inclusive upper bound so that setting the upper bound to 13 for example means that all 12.x versions are accepted. (cherry picked from commit 6c783817ef089e85642c3383937117cff9d15f67)
* Darwin CI: Don't explicitly pass ncurses/iconv pathsMatthew Pickering2021-06-252-3/+11
| | | | | | | | | | | | Passing --with-ncurses-libraries means the path which gets backed in progagate into the built binaries. This is incorrect when we want to distribute the binaries because the user might not have the library in that specific place. It's the user's reponsibility to direct the dynamic linker to the right place. Fixes #19968 (cherry picked from commit 3d3cee377dac31f24762e439dd614fccb8e4437e)
* rts: Pass -Wl,_U,___darwin_check_fd_set_overflow on DarwinMatthew Pickering2021-06-251-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note [fd_set_overflow] ~~~~~~~~~~~~~~~~~~~~~~ In this note is the very sad tale of __darwin_fd_set_overflow. The 8.10.5 release was broken because it was built in an environment where the libraries were provided by XCode 12.*, these libraries introduced a reference to __darwin_fd_set_overflow via the FD_SET macro which is used in Select.c. Unfortunately, this symbol is not available with XCode 11.* which led to a linker error when trying to link anything. This is almost certainly a bug in XCode but we still have to work around it. Undefined symbols for architecture x86_64: "___darwin_check_fd_set_overflow", referenced from: _awaitEvent in libHSrts.a(Select.o) ld: symbol(s) not found for architecture x86_64 One way to fix this is to upgrade your version of xcode, but this would force the upgrade on users prematurely. Fortunately it also seems safe to pass the linker option "-Wl,-U,___darwin_check_fd_set_overflow" because the usage of the symbol is guarded by a guard to check if it's defined. __header_always_inline int __darwin_check_fd_set(int _a, const void *_b) { if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) { return __darwin_check_fd_set_overflow(_a, _b, 1); return __darwin_check_fd_set_overflow(_a, _b, 0); } else { return 1; } Across the internet there are many other reports of this issue See: https://github.com/mono/mono/issues/19393 , https://github.com/sitsofe/fio/commit/b6a1e63a1ff607692a3caf3c2db2c3d575ba2320 The issue was originally reported in #19950 Fixes #19950 (cherry picked from commit 2f2b2b82147004b57f45a64b49cdb26c533e87bf)
* Guard Allocate Exec via LIBFFI by LIBFFIMoritz Angermann2021-06-251-1/+1
| | | | | | | | | | | | | | We now have two darwin flavours. AArch64-Darwin, and x86_64-darwin, the latter one which has proper custom adjustor support, the former though relies on libffi. Mixing both leads to odd crashes, as the closures might not fit the size of the libffi closures. Hence this needs to be guarded by the USE_LBFFI_FOR_ADJUSTORS guard. Original patch by Hamish Mackenzie (cherry picked from commit a6a8d3f57294f6319d778821e52d5dbef867b360)
* Pass -DLIBICONV_PLUG when building base library on FreeBSD.Gleb Popov2021-06-251-0/+6
| | | | | | | | | | | | | If libiconv is installed from packages on the build machine, there is a high chance that the build system will pick up /usr/local/include/iconv.h instead of base /usr/include/iconv.h This additional preprocessor define makes package's libiconv header compatible with system one, fixing the build. Closes issue #19958 (cherry picked from commit 5d3d9925d54988f3d2475de656c695289e5f0082)
* Use --integer-simple in ci builds for alpinewip/ghc-8.10-alpine-integer-simpleZubin Duggal2021-06-231-1/+1
|
* gitlab-ci: Drop old Darwin jobwip/ghc-8.10-ciBen Gamari2021-06-221-30/+0
| | | | This currently fails due to #19696.
* gitlab-ci: Bump ci-imagesBen Gamari2021-06-211-1/+1
|
* rts: export allocateWrite, freeWrite and markExec #19763wip/ghc-8.10-19763Adam Sandberg Ericsson2021-06-071-0/+10
| | | | (cherry picked from commit 2d2985a79eec3d6ae9aee96b264c97c2b158f196)
* Update llvm-targetsghc-8.10.5-releasewip/8.10-changelog-updatesZubin Duggal2021-06-042-10/+7
|
* Update autoconf scriptsZubin Duggal2021-06-042-43/+57
| | | | Scripts taken from autoconf 4550d2f15b3a7ce2451c1f29500b9339430c877f
* Bump stm and text submodulesZubin Duggal2021-06-042-0/+0
|
* Bump base and update unicode dataZubin Duggal2021-06-0413-64/+128
|
* Update release notesZubin Duggal2021-06-041-7/+15
|
* [hadrian] Do not add full tool pathsMoritz Angermann2021-05-313-3/+31
| | | | | | | | This prohuibits CC=clang to work generically and will always bake in the clang that is found on the build machine in PATH, what ever clang that might be. It might not even be on the final host. (cherry picked from commit 717befa54bf69584a46f07568645a13364759fd7)
* [ci/darwin] set SH to /bin/bashMoritz Angermann2021-05-311-1/+1
| | | | | | This should prevent some other `bash` to leak into the binary distributions. (cherry picked from commit 394f804ae8ad30dde7c556c7e0b3d3841472c431)
* [ci/darwin] use system provided iconv and cursesMoritz Angermann2021-05-314-10/+35
| | | | | | Also make sure to be able to build with non-apple-clang, while using apple's SDK on macOS (cherry picked from commit 839ee0c6127e04610af85143271cdafc94d9b2ae)
* Don't depend unconditionally on xattr in darwin_installBen Gamari2021-05-311-1/+3
| | | | | | Previously the Darwin installation logic would attempt to call xattr unconditionally. This would break on older Darwin releases where this utility did not exist.
* [bindist] inject xattr -c -r . into the darwin install phaseMoritz Angermann2021-05-312-0/+17
| | | | | | This is so awful, but at least it might get the job done. (cherry picked from commit 973044fa64c900b6ca73e57712271f966f0e0ef4)
* [ci] no more brew or pipMoritz Angermann2021-05-311-15/+0
| | | | | | | We pull dependencies (reliably) via nix, and open up nix where needed. (cherry picked from commit cd0a9d2130c7dce608a1a249ee823278a49cbad2)
* This patch addresses the exponential blow-up in the simplifier.Simon Peyton Jones2021-05-2132-259/+842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically: #13253 exponential inlining #10421 ditto #18140 strict constructors #18282 another nested-function call case This patch makes one really significant changes: change the way that mkDupableCont handles StrictArg. The details are explained in GHC.Core.Opt.Simplify Note [Duplicating StrictArg]. Specific changes * In mkDupableCont, when making auxiliary bindings for the other arguments of a call, add extra plumbing so that we don't forget the demand on them. Otherwise we haev to wait for another round of strictness analysis. But actually all the info is to hand. This change affects: - Make the strictness list in ArgInfo be [Demand] instead of [Bool], and rename it to ai_dmds. - Add as_dmd to ValArg - Simplify.makeTrivial takes a Demand - mkDupableContWithDmds takes a [Demand] There are a number of other small changes 1. For Ids that are used at most once in each branch of a case, make the occurrence analyser record the total number of syntactic occurrences. Previously we recorded just OneBranch or MultipleBranches. I thought this was going to be useful, but I ended up barely using it; see Note [Note [Suppress exponential blowup] in GHC.Core.Opt.Simplify.Utils Actual changes: * See the occ_n_br field of OneOcc. * postInlineUnconditionally 2. I found a small perf buglet in SetLevels; see the new function GHC.Core.Opt.SetLevels.hasFreeJoin 3. Remove the sc_cci field of StrictArg. I found I could get its information from the sc_fun field instead. Less to get wrong! 4. In ArgInfo, arrange that ai_dmds and ai_discs have a simpler invariant: they line up with the value arguments beyond ai_args This allowed a bit of nice refactoring; see isStrictArgInfo, lazyArgcontext, strictArgContext There is virtually no difference in nofib. (The runtime numbers are bogus -- I tried a few manually.) Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- fft +0.0% -2.0% -48.3% -49.4% 0.0% multiplier +0.0% -2.2% -50.3% -50.9% 0.0% -------------------------------------------------------------------------------- Min -0.4% -2.2% -59.2% -60.4% 0.0% Max +0.0% +0.1% +3.3% +4.9% 0.0% Geometric Mean +0.0% -0.0% -33.2% -34.3% -0.0% Test T18282 is an existing example of these deeply-nested strict calls. We get a big decrease in compile time (-85%) because so much less inlining takes place. Metric Decrease: T18282 (cherry picked from commit 0bd60059b0edfee9e8f66c6817257bbb946656cd)
* Add GHC 8.10.5 release notesBen Gamari2021-05-043-1/+131
|
* codeGen: Teach unboxed sum rep logic about levityBen Gamari2021-05-044-28/+72
| | | | | | | | | | | | | | | | Previously Unarise would happily project lifted and unlifted fields to lifted slots. This broke horribly in #19645, where a ByteArray# was passed in a lifted slot and consequently entered. The simplest way to fix this is what I've done here, distinguishing between lifted and unlifted slots in unarise. However, one can imagine more clever solutions, where we coerce the binder to the correct levity with respect to the sum's tag. I doubt that this would be worth the effort. Fixes #19645. (cherry picked from commit 721ea018712606b9feddf09c130552ed981b4900)
* testsuite: Add test for #19645Ben Gamari2021-05-043-0/+31
| | | | (cherry picked from commit 9f9fab1531d62f6d30c853722548393be264120b)
* rts: stats: Fix calculation for fragmentationDouglas Wilson2021-05-041-1/+1
| | | | (cherry picked from commit 06beed685a69ed044159707363a791fd266f069b)
* rts: stats: Some fixes to stats for sequential gcsDouglas Wilson2021-05-042-14/+37
| | | | | | | | | | Solves #19147. When n_capabilities > 1 we were not correctly accounting for gc time for sequential collections. In this case par_n_gcthreads == 1, however it is not guaranteed that the single gc thread is capability 0. A similar issue for copied is addressed as well. (cherry picked from commit f49d6fb27336297d6d7a46269a22dd98c131b4a8)
* base: Enable large file support for OFD locking impl.wip/backports-8.10Ben Gamari2021-04-291-0/+3
| | | | | | | Not only is this a good idea in general but this should also avoid issue #17950 by ensuring that off_t is 64-bits. (cherry picked from commit 9853fc5e3556e733b56976b0a2fce9e82130a9ef)
* Fix pthread_setname_np in itimer for DarwinViktor Dukhovni2021-04-273-10/+34
| | | | | _POSIX_SOURCE is too strict, we need _DARWIN_C_SOURCE, otherwise <pthread.h> does not expose pthread_setname_np(3).
* Block signals in the ticker threadViktor Dukhovni2021-04-203-13/+102
| | | | | | | | This avoids surprises in the non-threaded runtime with blocked signals killing the process because they're only blocked in the main thread and not in the ticker thread. Also backport improved compile-time detection of pthread_setname_np() and/or
* Partial Revert "[darwin] stop the DYLD_LIBRARY_PATH madness"wip/angerman/8.10-fix-19640Moritz Angermann2021-04-101-3/+4
| | | | | This partially reverts commit 820b0766984d42c06c977a6c32da75c429106f7f to fix #19640
* Winferred-safe-imports: Do not exit with errorKirill Elagin2021-04-071-1/+1
| | | | | | | | | | Currently, when -Winferred-safe-imports is enabled, even when it is not turned into an error, the compiler will still exit with exit code 1 if this warning was emitted. Make sure it is really treated as a warning. (cherry picked from commit d412d7a3783b4fc5d3078541a60996e249b4157c)
* Always define USE_PTHREAD_FOR_ITIMER for FreeBSD.Gleb Popov2021-04-071-1/+1
| | | | (cherry picked from commit 998450f4c67e8f701455927c9619b8d53f2b733b)
* Replace more autotools obsolete macros (#19189)Sylvain Henry2021-04-074-12/+6
| | | | (cherry picked from commit 42ab06f793c0164e2b60acc018ca37d91b46999a)
* configure: fix the use of some obsolete macros (#19189)Sylvain Henry2021-04-072-34/+34
| | | | (cherry picked from commit 66414bdf40534f07ac730e25f78e591994d2c1e4)
* Ensure tcg_env is up-to-date when running typechecker pluginsalexbiehl2021-04-071-4/+8
| | | | (cherry picked from commit b068103d60fd67708916ca5e778f5f833fcc34da)
* Fix Storeable instances for the windows timeout executable.Andreas Klebinger2021-04-071-2/+2
| | | | | | | | alignment clearly should be a power of two. This patch makes it so. We do so by using the #alignment directive instead of using the size of the type. (cherry picked from commit 847b0a6950ffdead534d0d4982f50ad17ae7cce0)
* Add missing .hi-boot dependencies with ghc -M (#14482)Sylvain Henry2021-04-0710-3/+71
| | | | (cherry picked from commit 18e106a8dfdae50c3078558382209f53794a8c97)
* gitlab-ci: Disable utimensat in Darwin buildsBen Gamari2021-04-071-0/+2
| | | | | | Fixes #17895. (cherry picked from commit ff4cfc2613c3fcc4c4dd5238ef22c116fe9ce87c)
* Don't catch async exceptions when evaluating Template HaskellZubin Duggal2021-04-071-3/+20
| | | | | | | (cherry picked from commit df6d42d0c2534fe620798aab01a393dbd40573fb) (cherry picked from commit 902ece87ffac545451c2a66d145e6c8653e12092) (cherry picked from commit 629dd56deedcd1162ef5417a9e446f6f1c2b667a) (cherry picked from commit c703cb398f980a1a799a5a7dbee763db12cc5f7f)
* make: disable ghc package environments #18988Adam Sandberg Ericsson2021-04-072-0/+2
| | | | (cherry picked from commit f27a71449aeb86ad9afa02431b3bd1a62ff5400a)
* Fix minimal imports dump for boot files (fix #18497)Sylvain Henry2021-04-079-10/+60
| | | | (cherry picked from commit 7c274cd530cc42a26028050b75d56b3437e06ec1)
* NCG: Codelayout: Distinguish conditional and other branches.Andreas Klebinger2021-04-071-3/+54
| | | | | | | | | | | | | | | | In #18053 we ended up with a suboptimal code layout because the code layout algorithm didn't distinguish between conditional and unconditional control flow. We can completely eliminate unconditional control flow instructions by placing blocks next to each other, not so much for conditionals. In terms of implementation we simply give conditional branches less weight before computing the layout. Fixes #18053 (cherry picked from commit edc2cc588add3f23b3650f15d3f495943f2c06f9)
* Fix an tricky specialiser loopSimon Peyton Jones2021-04-075-123/+432
| | | | | | | | | | | | | | | | Issue #17151 was a very tricky example of a bug in which the specialiser accidentally constructs a recurive dictionary, so that everything turns into bottom. I have fixed variants of this bug at least twice before: see Note [Avoiding loops]. It was a bit of a struggle to isolate the problem, greatly aided by the work that Alexey Kuleshevich did in distilling a test case. Once I'd understood the problem, it was not difficult to fix, though it did lead me a bit of refactoring in specImports. (cherry picked from commit cec2c71fe91c88649628c6e83416533b816b86a5)