summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* docs/relnotes: Mention -fprefer-byte-codeghc-9.6.1-rc1Ben Gamari2023-03-021-0/+6
| | | | Closes #23027.
* nativeGen: Disable asm-shortcutting on DarwinBen Gamari2023-03-022-2/+19
| | | | | | | | | | | | | | | 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)
* rts: Drop no-alignment special case for WindowsBen Gamari2023-03-021-3/+1
| | | | | | | | 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)
* rts: Correctly align Capability allocationsBen Gamari2023-03-021-2/+3
| | | | | | | | | | 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)
* rts: Introduce stgMallocAlignedBytesBen Gamari2023-03-023-3/+54
| | | | (cherry picked from commit eeb5bd560942a4968980fb341d9ebca33ad3302b)
* rts: Statically assert alignment of CapabilityBen Gamari2023-03-021-8/+16
| | | | | | | | | 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)
* Take more care with unlifted bindings in the specialiserSimon Peyton Jones2023-03-025-34/+101
| | | | | | | | | | 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)
* Fix shadowing bug in prepareAltsSimon Peyton Jones2023-03-024-13/+57
| | | | | | | | | | 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)
* Account for local rules in specImportsSimon Peyton Jones2023-03-026-46/+156
| | | | | | | | | | | | | 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)
* JS: fix for overlap with copyMutableByteArray# (#23033)Sylvain Henry2023-03-026-14/+48
| | | | | | | | 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)
* ghc-prim: fix hs_cmpxchg64 function prototypeCheng Shao2023-03-022-3/+3
| | | | | | | | | 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)
* Revert the main payload of "Make `drop` and `dropWhile` fuse (#18964)"Sebastian Graf2023-03-025-33/+56
| | | | | | | | | | | | | | | | | | 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)
* Account for TYPE vs CONSTRAINT in mkSelCoSimon Peyton Jones2023-03-025-7/+56
| | | | | | | | | 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)
* Refine the test for naughty record selectorsSimon Peyton Jones2023-03-024-36/+77
| | | | | | | | | 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)
* Bump unix submodule to 2.8.1.0Ben Gamari2023-02-231-0/+0
|
* Bump haskeline submodule to 0.8.2.1Ben Gamari2023-02-231-0/+0
|
* Bump unix submodule to preliminary 2.8 releaseBen Gamari2023-02-231-0/+0
|
* Bump terminfo submodule to 0.4.1.6Ben Gamari2023-02-231-0/+0
|
* Check for platform support for JavaScript foreign importsLuite Stegeman2023-02-233-1/+9
| | | | | | | | | | | 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)
* Testsuite: decrease length001 timeout for JS (#22921)Sylvain Henry2023-02-232-3/+8
|
* Add INLINABLE pragmas to `generic*` functions in Data.OldListMatthew Pickering2023-02-221-1/+1
| | | | | | | | | | | | | | 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)
* compiler: fix cost centre profiling breakage in wasm NCG due to incorrect ↵Cheng Shao2023-02-222-9/+1
| | | | | | | | | | | | | | | | | | | 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)
* rts: Fix `prompt#` when profiling is enabledAlexis King2023-02-227-2/+33
| | | | | | | | | | | 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)
* hadrian: Add dependency from lib/settings to mk/config.mkBen Gamari2023-02-221-1/+1
| | | | | | | | | | | | | | | | | 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)
* Explicit migration timeline for loopy SC solvingsheaf2023-02-228-9/+9
| | | | | | | | | | | 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)
* constant folding: Correct type of decodeDouble_Int64 ruleMatthew Pickering2023-02-223-5/+23
| | | | | | | | | | 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)
* base: Correct @since annotation for FP<->Integral bit cast operations.Andreas Klebinger2023-02-221-4/+4
| | | | | | Fixes #22708 (cherry picked from commit 348181ddab0493575101784f1833834e03849643)
* ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTsZubin Duggal2023-02-223-5/+265
| | | | | | | | | | 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)
* Bump deepseq submodule back to 1.4.8.1Ben Gamari2023-02-211-0/+0
|
* Bump submodule text to 2.0.2Bodigrim2023-02-211-0/+0
|
* Bump directory submodule to 1.3.8.1Ben Gamari2023-02-211-0/+0
|
* Bump filepath submodule to 1.4.100.1Ben Gamari2023-02-211-0/+0
|
* Bump text submoduleBen Gamari2023-02-211-0/+0
|
* Bump Cabal submodule to 3.9 pre-releaseBen Gamari2023-02-212-0/+0
|
* Bump array submodule to 0.5.4.0Ben Gamari2023-02-211-0/+0
|
* Bump hsc2hs submodule to 0.68.8Ben Gamari2023-02-211-0/+0
|
* Bump process submodule to v1.6.17.0Ben Gamari2023-02-211-0/+0
|
* release notes: Correct supported LLVM rangeMatthew Pickering2023-02-201-1/+1
| | | | Fixes #23006
* RTS: declare setKeepCAFs symbolsheaf2023-02-201-0/+1
| | | | | | | | | | | | 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)
* Treat existentials correctly in dubiousDataConInstArgTysSimon Peyton Jones2023-02-203-9/+32
| | | | | | | | | | | | | | | 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)
* doc: fix gcdetails_block_fragmentation_bytes since annotationTeo Camarasu2023-02-201-1/+2
| | | | (cherry picked from commit 354aa47d313113855aff9e5c5476fcb56f80e3bf)
* Bump DOCKER_REV to use alpine image without LLVM installedMatthew Pickering2023-02-201-1/+1
| | | | | | | alpine_3_12 only supports LLVM 10, which is now outside the supported version range. (cherry picked from commit f94f14502a00824d48cef69d362774a9a4bfc6d6)
* Bump supported LLVM range from 10 through 15 to 11 through 16Matthew Pickering2023-02-202-5/+5
| | | | | | | | | | | | | | | | 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)
* ghcup-metadata: Add test artifactMatthew Pickering2023-02-201-0/+3
| | | | | | Add the released testsuite tarball to the generated ghcup metadata. (cherry picked from commit 3dd50e2f4e3f2fac2f75b1223944dcdcc896e508)
* Add INLINABLE pragmas to `generic*` functions in Data.OldListMatthew Pickering2023-02-202-0/+7
| | | | | | | | | | | | | | 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)
* ghcup-metadata: Use Ubuntu and Rocky bindistsMatthew Pickering2023-02-202-5/+20
| | | | | | | | 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)
* Expand synonyms in RoughMapsheaf2023-02-204-2/+19
| | | | | | | | | | | | | 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)
* JS: disable debugging info for heap objectsSylvain Henry2023-02-201-1/+3
| | | | (cherry picked from commit 324e925be847d3969724be3e1b82c25899aaca27)
* compiler: fix generateCgIPEStub for no-tables-next-to-code buildsCheng Shao2023-02-201-14/+14
| | | | | | | | | | | 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)
* unicode: Don't inline bitmap in generalCategoryMatthew Pickering2023-02-203-2/+12
| | | | | | | | | | | | | | | | | | | 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)