| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes #23027.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Asm-shortcutting may produce relative references to symbols defined in
other compilation units. This is not something that MachO relocations
support (see #21972). For this reason we disable the optimisation on
Darwin. We do so without a warning since this flag is enabled by `-O2`.
Another way to address this issue would be to rather implement a
PLT-relocatable jump-table strategy. However, this would only benefit
Darwin and does not seem worth the effort.
Closes #21972.
(cherry picked from commit 8bed166bb79445f90015757fd5baac69a7b835df)
|
|
|
|
|
|
|
|
| |
For reasons that aren't clear, we were previously not giving Capability
the same favorable alignment on Windows that we provided on other
platforms. Fix this.
(cherry picked from commit 05c5b14c5e28c279de0d84472526eccb7f05d00a)
|
|
|
|
|
|
|
|
|
|
| |
Previously we failed to tell the C allocator that `Capability`s needed
to be aligned, resulting in #22965.
Fixes #22965.
Fixes #22975.
(cherry picked from commit 2cca72cd3e4de25fa81dc6fcc9979e613697a838)
|
|
|
|
| |
(cherry picked from commit eeb5bd560942a4968980fb341d9ebca33ad3302b)
|
|
|
|
|
|
|
|
|
| |
In #22965 we noticed that changes in the size of `Capability` can result
in unsound behavior due to the `align` pragma claiming an alignment
which we don't in practice observe. Avoid this by statically asserting
that the size is a multiple of the alignment.
(cherry picked from commit 485ccddacff5ed8892348905754c02452ac8f523)
|
|
|
|
|
|
|
|
|
|
| |
As #22998 showed, we were floating an unlifted binding to top
level, which breaks a Core invariant.
The fix is easy, albeit a little bit conservative. See
Note [Care with unlifted bindings] in GHC.Core.Opt.Specialise
(cherry picked from commit 7192ef91c855e1fae6997f75cfde76aafd0b4bcf)
|
|
|
|
|
|
|
|
|
|
| |
As #23012 showed, GHC.Core.Opt.Simplify.Utils.prepareAlts was
using an OutType to construct an InAlt. When shadowing is in play,
this is outright wrong.
See Note [Shadowing in prepareAlts].
(cherry picked from commit ece092d07f343dcfb4563e4f42d53a2a1e449f1a)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As #23024 showed, in GHC.Core.Opt.Specialise.specImports, we were
generating specialisations (a locally-define function) for imported
functions; and then generating specialisations for those
locally-defined functions. The RULE for the latter should be
attached to the local Id, not put in the rules-for-imported-ids
set.
Fix is easy; similar to what happens in GHC.HsToCore.addExportFlagsAndRules
(cherry picked from commit 0c200ab78c814cb5d1efaf426f0d3d91ceab9f4d)
|
|
|
|
|
|
|
|
| |
The code wasn't taking into account some kind of overlap.
cgrun070 has been extended to test the missing case.
(cherry picked from commit 8b77f9bfceb456115f63349ad0ff66a5cea7ab59)
|
|
|
|
|
|
|
|
|
| |
hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
builds, which go unnoticed at compile-time due to C implicit casting
in .hc files.
(cherry picked from commit 9fa545722f9151781344446dd5501db38cb90dd1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the bits affecting fusion of `drop` and `dropWhile` of commit
0f7588b5df1fc7a58d8202761bf1501447e48914 and keeps just the small refactoring
unifying `flipSeqTake` and `flipSeqScanl'` into `flipSeq`.
It also adds a new test for #23021 (which was the reason for reverting) as
well as adds a clarifying comment to T18964.
Fixes #23021, unfixes #18964.
Metric Increase:
T18964
Metric Decrease:
T18964
(cherry picked from commit a2a1a1c08bb520b74b00194a83add82b287b38d5)
|
|
|
|
|
|
|
|
|
| |
As #23018 showed, in mkRuntimeRepCo we need to account for coercions
between TYPE and COERCION.
See Note [mkRuntimeRepCo] in GHC.Core.Coercion.
(cherry picked from commit bb500e2a2d039dc75c8bb80d47ea2349b97fbf1b)
|
|
|
|
|
|
|
|
|
| |
The test for naughtiness in record selectors is surprisingly subtle.
See the revised Note [Naughty record selectors] in GHC.Tc.TyCl.Utils.
Fixes #23038.
(cherry picked from commit cf118e2fac04b79cc7fa63cff0552190c3885bb9)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
GHC was accepting `foreign import javascript` declarations
on non-JavaScript platforms. This adds a check so that these
are only supported on an platform that supports the JavaScript
calling convention.
Fixes #22774
(cherry picked from commit 1d7c2e4c9d63a7b392024cfcde299849b8d667a8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are
* recursive
* overloaded
So it's important to add an `INLINABLE` pragma to each so that they can be
specialised at the use site when the specific numeric type is known.
Adding these pragmas improves the LazyText replicate benchmark (see https://gitlab.haskell.org/ghc/ghc/-/issues/22886#note_481020)
https://github.com/haskell/core-libraries-committee/issues/129
(cherry picked from commit be0b7209c6aef22798fc4ba7baacd2099b5cb494)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
register mapping
The wasm NCG used to map CCCS to a wasm global, based on the
observation that CCCS is a transient register that's already handled
by thread state load/store logic, so it doesn't need to be backed by
the rCCCS field in the register table.
Unfortunately, this is wrong, since even when Cmm execution hasn't
yielded back to the scheduler, the Cmm code may call enterFunCCS,
which does use rCCCS.
This breaks cost centre profiling in a subtle way, resulting in
inaccurate stack traces in some test cases. The fix is simple though:
just remove the CCCS mapping.
(cherry picked from commit 2592ab6924ee34ed0f0d82a7cb0aed393d93bb14)
|
|
|
|
|
|
|
|
|
|
|
| |
This commit also adds a new -Dk RTS option to the debug RTS to assist
debugging continuation captures. Currently, the printed information is
quite minimal, but more can be added in the future if it proves to be
useful when debugging future issues.
fixes #23001
(cherry picked from commit e5794ede9e2af208669438a7f72958aeecbec111)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 81975ef375de07a0ea5a69596b2077d7f5959182 we attempted to fix #20253
by adding logic to the bindist Makefile to regenerate the `settings`
file from information gleaned by the bindist `configure` script.
However, this fix had no effect as `lib/settings` is shipped in the
binary distribution (to allow in-place use of the binary distribution).
As `lib/settings` already existed and its rule declared no dependencies,
`make` would fail to use the added rule to regenerate it.
Fix this by explicitly declaring a dependency from `lib/settings` on
`mk/config.mk`.
Fixes #22982.
(cherry picked from commit f8876261abebbbac2454e2335f728916ba7c959b)
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates the warning message introduced in commit
9fb4ca89bff9873e5f6a6849fa22a349c94deaae to specify an explicit
migration timeline: GHC will no longer support this constraint solving
mechanism starting from GHC 9.10.
Fixes #22912
(cherry picked from commit daee5602f753372bd4b81589aacd3df4a00257e8)
|
|
|
|
|
|
|
|
|
|
| |
The first argument is Int64# unconditionally, so we better produce
something of that type. This fixes a core lint error found in the ad
package.
Fixes #23019
(cherry picked from commit 3c9b89adb0c953de02d301623b13541a9fe5feda)
|
|
|
|
|
|
| |
Fixes #22708
(cherry picked from commit 348181ddab0493575101784f1833834e03849643)
|
|
|
|
|
|
|
|
|
|
| |
Commit 7566fd9de38c67360c090f828923d41587af519c with the fix for #22798 was
incomplete as it failed to handle MULTILINE_COMMENT pseudo-instructions, and
didn't completly fix the compiler panics when compiling with `-fregs-graph`.
Fixes #23002
(cherry picked from commit 0ea260da3c2b32778758737f6145b2b23ce5f776)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #23006
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 08ba8720 failed to declare the dependency of keepCAFsForGHCi on
the symbol setKeepCAFs in the RTS, which led to undefined symbol errors
on Windows, as exhibited by the testcase frontend001.
Thanks to Moritz Angermann and Ryan Scott for the diagnosis and fix.
Fixes #22961
(cherry picked from commit cf564dd71548771394249e9bf959512a21bbcec0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider (#22849)
data T a where
MkT :: forall k (t::k->*) (ix::k). t ix -> T @k a
Then dubiousDataConInstArgTys MkT [Type, Foo] should return
[Foo (ix::Type)]
NOT [Foo (ix::k)]
A bit of an obscure case, but it's an outright bug, and the fix is easy.
(cherry picked from commit 955a99ea28a0d06de67f0595d366450281aab0c0)
|
|
|
|
| |
(cherry picked from commit 354aa47d313113855aff9e5c5476fcb56f80e3bf)
|
|
|
|
|
|
|
| |
alpine_3_12 only supports LLVM 10, which is now outside the supported
version range.
(cherry picked from commit f94f14502a00824d48cef69d362774a9a4bfc6d6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM 15 turns on the new pass manager by default, which we have yet to
migrate to so for new we pass the `-enable-new-pm-0` flag in our
llvm-passes flag.
LLVM 11 was the first version to support the `-enable-new-pm` flag so we
bump the lowest supported version to 11.
Our CI jobs are using LLVM 12 so they should continue to work despite
this bump to the lower bound.
Fixes #21936
(cherry picked from commit 0cc16aaf89d7dc3963764b7193ceac73e4e3329b)
|
|
|
|
|
|
| |
Add the released testsuite tarball to the generated ghcup metadata.
(cherry picked from commit 3dd50e2f4e3f2fac2f75b1223944dcdcc896e508)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are
* recursive
* overloaded
So it's important to add an `INLINABLE` pragma to each so that they can be
specialised at the use site when the specific numeric type is known.
Adding these pragmas improves the LazyText replicate benchmark (see https://gitlab.haskell.org/ghc/ghc/-/issues/22886#note_481020)
https://github.com/haskell/core-libraries-committee/issues/129
(cherry picked from commit be0b7209c6aef22798fc4ba7baacd2099b5cb494)
|
|
|
|
|
|
|
|
| |
Prefer to use the Ubuntu 20.04 and 18.04 binary distributions on Ubuntu
and Linux Mint. Prefer to use the Rocky 8 binary distribution on
unknown distributions.
(cherry picked from commit c6a967d9545ef5577514466f3fa6894f2899aff8)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were failing to expand type synonyms in the function
GHC.Core.RoughMap.typeToRoughMatchLookupTc, even though the
RoughMap infrastructure crucially relies on type synonym expansion
to work.
This patch adds the missing type-synonym expansion.
Fixes #22985
(cherry picked from commit 8988eeef193f055d7b67de5aaa00590c63491fb5)
|
|
|
|
| |
(cherry picked from commit 324e925be847d3969724be3e1b82c25899aaca27)
|
|
|
|
|
|
|
|
|
|
|
| |
generateCgIPEStub already correctly implements the CmmTick finding
logic for when tables-next-to-code is on/off, but it used the wrong
predicate to decide when to switch between the two. Previously it
switches based on whether the codegen is unregisterised, but there do
exist registerised builds that disable tables-next-to-code! This patch
corrects that problem. Fixes #22896.
(cherry picked from commit 3b019a7ac8fc9059cc3213f6f95a2daef97ca442)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generalCategory contains a huge literal string but is marked INLINE,
this will duplicate the string into any use site of generalCategory. In
particular generalCategory is used in functions like isSpace and the
literal gets inlined into this function which makes it massive.
https://github.com/haskell/core-libraries-committee/issues/130
Fixes #22949
-------------------------
Metric Decrease:
T4029
T18304
-------------------------
(cherry picked from commit b3ac17ad6d7f504ee7615ca67e02e5e094cf1905)
|