| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit f926ecfdcdf5468b8539bc8f4aad87404f1e397e)
|
|
|
|
| |
(cherry picked from commit 74c874148fbea996cadf1d9fa50f2a44488dd82b)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
This currently fails due to #19696.
|
| |
|
|
|
|
| |
(cherry picked from commit 2d2985a79eec3d6ae9aee96b264c97c2b158f196)
|
| |
|
|
|
|
| |
Scripts taken from autoconf 4550d2f15b3a7ce2451c1f29500b9339430c877f
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
This should prevent some other `bash` to leak into the binary distributions.
(cherry picked from commit 394f804ae8ad30dde7c556c7e0b3d3841472c431)
|
|
|
|
|
|
| |
Also make sure to be able to build with non-apple-clang, while using apple's SDK on macOS
(cherry picked from commit 839ee0c6127e04610af85143271cdafc94d9b2ae)
|
|
|
|
|
|
| |
Previously the Darwin installation logic would attempt to call xattr
unconditionally. This would break on older Darwin releases where this
utility did not exist.
|
|
|
|
|
|
| |
This is so awful, but at least it might get the job done.
(cherry picked from commit 973044fa64c900b6ca73e57712271f966f0e0ef4)
|
|
|
|
|
|
|
| |
We pull dependencies (reliably) via nix, and open up nix where
needed.
(cherry picked from commit cd0a9d2130c7dce608a1a249ee823278a49cbad2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 9f9fab1531d62f6d30c853722548393be264120b)
|
|
|
|
| |
(cherry picked from commit 06beed685a69ed044159707363a791fd266f069b)
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
_POSIX_SOURCE is too strict, we need _DARWIN_C_SOURCE, otherwise
<pthread.h> does not expose pthread_setname_np(3).
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This partially reverts commit 820b0766984d42c06c977a6c32da75c429106f7f
to fix #19640
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 998450f4c67e8f701455927c9619b8d53f2b733b)
|
|
|
|
| |
(cherry picked from commit 42ab06f793c0164e2b60acc018ca37d91b46999a)
|
|
|
|
| |
(cherry picked from commit 66414bdf40534f07ac730e25f78e591994d2c1e4)
|
|
|
|
| |
(cherry picked from commit b068103d60fd67708916ca5e778f5f833fcc34da)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
(cherry picked from commit 18e106a8dfdae50c3078558382209f53794a8c97)
|
|
|
|
|
|
| |
Fixes #17895.
(cherry picked from commit ff4cfc2613c3fcc4c4dd5238ef22c116fe9ce87c)
|
|
|
|
|
|
|
| |
(cherry picked from commit df6d42d0c2534fe620798aab01a393dbd40573fb)
(cherry picked from commit 902ece87ffac545451c2a66d145e6c8653e12092)
(cherry picked from commit 629dd56deedcd1162ef5417a9e446f6f1c2b667a)
(cherry picked from commit c703cb398f980a1a799a5a7dbee763db12cc5f7f)
|
|
|
|
| |
(cherry picked from commit f27a71449aeb86ad9afa02431b3bd1a62ff5400a)
|
|
|
|
| |
(cherry picked from commit 7c274cd530cc42a26028050b75d56b3437e06ec1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|