| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(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)
|
|
|
|
|
|
|
| |
Previously we were treating the thread ID as a HANDLE, but it is not. We
must first OpenThread.
(cherry picked from commit 63a5c876657bb89e9847f325fb81df2229297eb3)
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes !18744
|
|
|
|
| |
closes #19362
|
|
|
|
|
| |
Metric Increase:
T11276
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previously we would support only one LLVM major version. Here we
generalize this to accept a range, taking this range to be LLVM 10 to 11,
as 11 is necessary for Apple M1 support. We also accept 12, as that is
what apple ships with BigSur on the M1.
|
|
|
|
| |
This should make it buildable (outside of the ghc tree) again.
|
| |
|