[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: libraries: bump haskeline submodule to 0.8.4.1
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: ba789a41 by Cheng Shao at 2026-01-18T04:10:22-05:00 libraries: bump haskeline submodule to 0.8.4.1 This patch bumps the haskeline submodule to 0.8.4.1 which includes an important fix for an ANSI handling bug on Windows (https://github.com/haskell/haskeline/pull/126). - - - - - 93a9cac5 by Cheng Shao at 2026-01-18T04:10:23-05:00 hadrian: replace default -H32m/-H64m with -O64M to improve mutator productivity Most hadrian build flavours pass `-H32m`/`-H64m` to GHC as conventional wisdom to improve mutator productivity and reduce GC overhead. They were inherited from the legacy Make build system, and there used to be make flags to instrument a build process with `-Rghc-timing` option to collect GC stats of each GHC run from stderr. It's time to revisit whether there are better defaults for `-H32m`/`-H64m`, and this patch changes it to `-O64M` which indeed improves mutator productivity based on real statistics. `-O64M` is more aggressive than `-H64m`; it allows the old generation to grow to at least 64M before triggering major GC and reduces major GC runs. The stats of a clean build with `validate` flavour and `-H64m`: ``` h64m.log matched RTS stat lines: 5499 sum MUT cpu : 2400.808 s sum GC cpu : 1378.292 s sum MUT elapsed : 2788.253 s sum GC elapsed : 1389.233 s GC/MUT cpu ratio : 0.574 (GC is 57.4% of MUT) GC/MUT elapsed ratio : 0.498 (GC is 49.8% of MUT) GC fraction of (MUT+GC) cpu : 36.5% GC fraction of (MUT+GC) elapsed : 33.3% per-line GC/MUT cpu ratio: median 0.691, p90 1.777 per-line GC/MUT elapsed ratio: median 0.519, p90 1.081 ``` The stats of a clean build with `validate` flavour and `-O64M`: ``` o64m.log matched RTS stat lines: 5499 sum MUT cpu : 2377.383 s sum GC cpu : 1127.146 s sum MUT elapsed : 2758.857 s sum GC elapsed : 1135.587 s GC/MUT cpu ratio : 0.474 (GC is 47.4% of MUT) GC/MUT elapsed ratio : 0.412 (GC is 41.2% of MUT) GC fraction of (MUT+GC) cpu : 32.2% GC fraction of (MUT+GC) elapsed : 29.2% per-line GC/MUT cpu ratio: median 0.489, p90 1.099 per-line GC/MUT elapsed ratio: median 0.367, p90 0.806 ``` Mutator time is roughly in the same ballpark, but GC CPU time has reduced by 18.22%, and mutator productivity has increased from 63.5% to 67.8%. - - - - - 331eb1c4 by Cheng Shao at 2026-01-18T04:10:24-05:00 rts: remove unused .def files from rts/win32 This patch removes unused .def files from `rts/win32`, given we don't build .dll files for rts/ghc-internal/ghc-prim at all. Even when we resurrect win32 dll support at some point in the future, these .def files still contain incorrect symbols anyway and won't be of any use. - - - - - 652c8e21 by Cheng Shao at 2026-01-18T04:10:25-05:00 .gitmodules: use gitlab mirror for the libffi-clib submodule This patch fixes .gitmodules to use the gitlab mirror for the libffi-clib submodule, to make it coherent with other submodules that allow ghc developers to experiment with wip branches in submodules for ghc patches. Fixes #26783. - - - - - e052213f by Cheng Shao at 2026-01-18T04:10:25-05:00 hadrian: remove the horrible i386 speedHack When hadrian builds certain rts objects for i386, there's a horrible speedHack that forces -fno-PIC even for dynamic ways of those objects. This is not compatible with newer versions of gcc/binutils as well as clang/lld, and this patch removes it. Fixes #26792. - - - - - 16 changed files: - .gitmodules - hadrian/doc/flavours.md - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Flavours/Benchmark.hs - hadrian/src/Settings/Flavours/Development.hs - hadrian/src/Settings/Flavours/GhcInGhci.hs - hadrian/src/Settings/Flavours/Performance.hs - hadrian/src/Settings/Flavours/Quick.hs - hadrian/src/Settings/Flavours/QuickCross.hs - hadrian/src/Settings/Flavours/Quickest.hs - hadrian/src/Settings/Flavours/Validate.hs - hadrian/src/Settings/Packages.hs - libraries/haskeline - − rts/win32/libHSffi.def - − rts/win32/libHSghc-internal.def - − rts/win32/libHSghc-prim.def Changes: ===================================== .gitmodules ===================================== @@ -122,4 +122,4 @@ url = https://gitlab.haskell.org/ghc/template-haskell-quasiquoter.git [submodule "libraries/libffi-clib"] path = libraries/libffi-clib - url = https://github.com/stable-haskell/libffi-clib.git + url = https://gitlab.haskell.org/ghc/libffi-clib.git ===================================== hadrian/doc/flavours.md ===================================== @@ -37,8 +37,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>default<br></td> <td> </td> - <td>-O<br>-H32m<br></td> - <td>-O2<br>-H32m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br></td> + <td>-O2<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-haddock</td> <td></td> @@ -49,8 +49,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick</td> <td> </td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O</td> <td>-O2</td> @@ -61,8 +61,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick-validate</td> <td></td> - <td>-O0<br>-H64m<br>-Werror</td> - <td>-O0<br>-H64m<br>-Werror</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS<br>-Werror</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS<br>-Werror</td> <td></td> <td>-O</td> <td>-O2</td> @@ -73,8 +73,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quick-debug</td> <td></td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O</td> <td>-O2</td> @@ -85,8 +85,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>quickest</td> <td></td> - <td>-O0<br>-H64m</td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td></td> <td>-O</td> @@ -97,8 +97,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>perf</td> <td> Yes (on supported platforms) </td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -109,8 +109,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>release (same as perf with -haddock and +no_self_recomp+hash_unit_ids)</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -121,8 +121,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>bench</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-O2</td> <td>-O2</td> @@ -133,8 +133,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>devel1</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-dcore-lint</td> <td>-O0<br>-DDEBUG</td> @@ -145,8 +145,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>devel2</td> <td></td> - <td>-O<br>-H64m</td> - <td>-O<br>-H64m</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS</td> <td></td> <td>-dcore-lint</td> <td>-O2</td> @@ -157,7 +157,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>validate</td> <td></td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td>-fllvm-fill-undef-with-garbage<br>-fcheck-prim-bounds</td> <td></td> <td>-O<br>-dcore-lint<br>-dno-debug-output</td> @@ -169,7 +169,7 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>slow-validate</td> <td></td> - <td>-O0<br>-H64m</td> + <td>-O0<br>+RTS<br>-O64M<br>-RTS</td> <td>-fllvm-fill-undef-with-garbage</td> <td></td> <td>-O<br>-dcore-lint<br>-dno-debug-output</td> @@ -181,8 +181,8 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH <tr> <th>static</td> <td></td> - <td>-O<br>-H64m<br>-fPIC -static</td> - <td>-O<br>-H64m<br>-fPIC -static</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br>-fPIC -static</td> + <td>-O<br>+RTS<br>-O64M<br>-RTS<br>-fPIC -static</td> <td></td> <td>-O2</td> <td>-O2</td> ===================================== hadrian/src/Settings/Default.hs ===================================== @@ -274,7 +274,7 @@ defaultSourceArgs :: SourceArgs defaultSourceArgs = SourceArgs { hsDefault = mconcat [ stage0 ? arg "-O" , notStage0 ? arg "-O2" - , arg "-H32m" ] + , pure ["+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? arg "-haddock" , hsCompiler = mempty , hsGhc = mempty } ===================================== hadrian/src/Settings/Flavours/Benchmark.hs ===================================== @@ -16,7 +16,7 @@ benchmarkFlavour = defaultFlavour benchmarkArgs :: Args benchmarkArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] + { hsDefault = pure ["-O", "+RTS", "-O64M", "-RTS"] , hsLibrary = pure ["-O2"] -- TODO: We should really pass -O2 when notStage0. Otherwise, we aren't -- really measuring the overhead of a potential new optimisation we want ===================================== hadrian/src/Settings/Flavours/Development.hs ===================================== @@ -26,7 +26,7 @@ developmentFlavour ghcStage = defaultFlavour developmentArgs :: Stage -> Args developmentArgs ghcStage = sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O", "-H64m"], + { hsDefault = mconcat [ pure ["-O", "+RTS", "-O64M", "-RTS"], -- Disable optimization when building Cabal; -- this saves many minutes of build time. package cabal ? pure ["-O0"]] ===================================== hadrian/src/Settings/Flavours/GhcInGhci.hs ===================================== @@ -22,7 +22,7 @@ ghcInGhciFlavour = defaultFlavour ghciArgs :: Args ghciArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = mempty , hsCompiler = mempty ===================================== hadrian/src/Settings/Flavours/Performance.hs ===================================== @@ -12,7 +12,7 @@ performanceFlavour = splitSections $ enableLateCCS $ defaultFlavour performanceArgs :: Args performanceArgs = sourceArgs SourceArgs - { hsDefault = pure ["-O", "-H64m"] + { hsDefault = pure ["-O", "+RTS", "-O64M", "-RTS"] , hsLibrary = orM [notStage0, cross] ? arg "-O2" , hsCompiler = pure ["-O2"] , hsGhc = mconcat ===================================== hadrian/src/Settings/Flavours/Quick.hs ===================================== @@ -34,7 +34,7 @@ quickFlavour = defaultFlavour quickArgs :: Args quickArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ pure ["-O0", "-H64m"] ] + { hsDefault = mconcat [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? arg "-O" , hsCompiler = stage0 ? arg "-O2" , hsGhc = stage0 ? arg "-O" } ===================================== hadrian/src/Settings/Flavours/QuickCross.hs ===================================== @@ -32,7 +32,7 @@ quickCrossFlavour = defaultFlavour quickCrossArgs :: Args quickCrossArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = notStage0 ? mconcat [ arg "-O", arg "-fllvm" ] , hsCompiler = stage0 ? arg "-O2" ===================================== hadrian/src/Settings/Flavours/Quickest.hs ===================================== @@ -19,7 +19,7 @@ quickestFlavour = defaultFlavour quickestArgs :: Args quickestArgs = sourceArgs SourceArgs { hsDefault = mconcat $ - [ pure ["-O0", "-H64m"] + [ pure ["-O0", "+RTS", "-O64M", "-RTS"] ] , hsLibrary = mempty , hsCompiler = stage0 ? arg "-O" ===================================== hadrian/src/Settings/Flavours/Validate.hs ===================================== @@ -16,11 +16,12 @@ validateFlavour = enableLinting $ quickValidateFlavour validateArgs :: Args validateArgs = sourceArgs SourceArgs - { hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"] + { hsDefault = mconcat [ stage0 ? pure ["-O0"] -- See #11487 , notStage0 ? arg "-fllvm-fill-undef-with-garbage" , notStage0 ? arg "-dno-debug-output" , notStage0 ? arg "-fcheck-prim-bounds" + , pure ["+RTS", "-O64M", "-RTS"] ] , hsLibrary = pure ["-O"] , hsCompiler = mconcat [ stage0 ? pure ["-O2"] @@ -37,7 +38,7 @@ slowValidateFlavour = validateFlavour quickValidateArgs :: Args quickValidateArgs = sourceArgs SourceArgs - { hsDefault = mempty + { hsDefault = pure ["+RTS", "-O64M", "-RTS"] , hsLibrary = pure [ "-O" ] , hsCompiler = mconcat [ stage0 ? arg "-O2", notStage0 ? arg "-O"] , hsGhc = pure [ "-O", "-hide-all-packages" ] ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -370,21 +370,6 @@ rtsPackageArgs = package rts ? do , inputs ["**/Evac.c", "**/Evac_thr.c"] ? arg "-funroll-loops" - , speedHack ? - inputs [ "**/Evac.c", "**/Evac_thr.c" - , "**/Scav.c", "**/Scav_thr.c" - , "**/Compact.c", "**/GC.c" ] ? arg "-fno-PIC" - -- @-static@ is necessary for these bits, as otherwise the NCG - -- generates dynamic references. - , speedHack ? - inputs [ "**/Updates.c", "**/StgMiscClosures.c" - , "**/Jumps_D.c", "**/Jumps_V16.c", "**/Jumps_V32.c", "**/Jumps_V64.c" - , "**/PrimOps.c", "**/Apply.c" - , "**/AutoApply.c" - , "**/AutoApply_V16.c" - , "**/AutoApply_V32.c" - , "**/AutoApply_V64.c" ] ? pure ["-fno-PIC", "-static"] - -- See Note [AutoApply.cmm for vectors] in genapply/Main.hs , inputs ["**/AutoApply_V32.c"] ? pure [ "-mavx2" | x86 ] , inputs ["**/AutoApply_V64.c"] ? pure [ "-mavx512f" | x86 ] @@ -452,42 +437,6 @@ rtsPackageArgs = package rts ? do , builder HsCpp ? useLibdw ? arg "-DUSE_LIBDW" ] --- Compile various performance-critical pieces *without* -fPIC -dynamic --- even when building a shared library. If we don't do this, then the --- GC runs about 50% slower on x86 due to the overheads of PIC. The --- cost of doing this is a little runtime linking and less sharing, but --- not much. --- --- On x86_64 this doesn't work, because all objects in a shared library --- must be compiled with -fPIC (since the 32-bit relocations generated --- by the default small memory can't be resolved at runtime). So we --- only do this on i386. --- --- This apparently doesn't work on OS X (Darwin) nor on Solaris. --- On Darwin we get errors of the form --- --- ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast --- from rts/dist-install/build/Apply.dyn_o not allowed in slidable image --- --- and lots of these warnings: --- --- ld: warning codegen in _stg_ap_pppv_fast (offset 0x0000005E) prevents image --- from loading in dyld shared cache --- --- On Solaris we get errors like: --- --- Text relocation remains referenced --- against symbol offset in file --- .rodata (section) 0x11 rts/dist-install/build/Apply.dyn_o --- ... --- ld: fatal: relocations remain against allocatable but non-writable sections --- collect2: ld returned 1 exit status -speedHack :: Action Bool -speedHack = do - i386 <- anyTargetArch [ArchX86] - goodOS <- not <$> anyTargetOs [OSSolaris2] - return $ i386 && goodOS - -- See @rts/ghc.mk@. rtsWarnings :: Args rtsWarnings = mconcat ===================================== libraries/haskeline ===================================== @@ -1 +1 @@ -Subproject commit 991953cd5d3bb9e8057de4a0d8f2cae3455865d8 +Subproject commit d0d8902f88fde549f76771feeb40f16941a22a9f ===================================== rts/win32/libHSffi.def deleted ===================================== @@ -1,19 +0,0 @@ - -LIBRARY "libHSffi-ghc@ProjectVersion@.dll" - -EXPORTS - - ffi_prep_cif - ffi_call - ffi_type_void - ffi_type_float - ffi_type_double - ffi_type_sint64 - ffi_type_uint64 - ffi_type_sint32 - ffi_type_uint32 - ffi_type_sint16 - ffi_type_uint16 - ffi_type_sint8 - ffi_type_uint8 - ffi_type_pointer ===================================== rts/win32/libHSghc-internal.def deleted ===================================== @@ -1,49 +0,0 @@ - -LIBRARY "libHSghc-internal-@LibVersion@-ghc@ProjectVersion@.dll" - -EXPORTS - ghczminternal_GHCziInternalziInt_I8zh_con_info - ghczminternal_GHCziInternalziInt_I16zh_con_info - ghczminternal_GHCziInternalziInt_I32zh_con_info - ghczminternal_GHCziInternalziInt_I64zh_con_info - - ghczminternal_GHCziInternalziWord_W8zh_con_info - ghczminternal_GHCziInternalziWord_W16zh_con_info - ghczminternal_GHCziInternalziWord_W32zh_con_info - ghczminternal_GHCziInternalziWord_W64zh_con_info - - ghczminternal_GHCziInternalziStable_StablePtr_con_info - - ghczminternal_GHCziInternalziPack_unpackCString_closure - - ghczminternal_GHCziInternalziTopHandler_runIO_closure - ghczminternal_GHCziInternalziTopHandler_runNonIO_closure - - ghczminternal_GHCziInternalziIOziException_stackOverflow_closure - ghczminternal_GHCziInternalziIOziException_heapOverflow_closure - - ghczminternal_GHCziInternalziPtr_Ptr_con_info - ghczminternal_GHCziInternalziPtr_FunPtr_con_info - - ghczminternal_GHCziInternalziConcziIO_ensureIOManagerIsRunning_closure - ghczminternal_GHCziInternalziConcziIO_interruptIOManager_closure - ghczminternal_GHCziInternalziConcziIO_ioManagerCapabilitiesChanged_closure - ghczminternal_GHCziInternalziConcziSync_runSparks_closure - ghczminternal_GHCziInternalziEventziWindows_processRemoteCompletion_closure - - ghczminternal_GHCziInternalziTopHandler_flushStdHandles_closure - - ghczminternal_GHCziInternalziWeakziFinalizze_runFinalizzerBatch_closure - ghczminternal_GHCziInternalziPack_unpackCString_closure - ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnMVar_closure - ghczminternal_GHCziInternalziIOziException_blockedIndefinitelyOnSTM_closure - ghczminternal_GHCziInternalziIOziException_allocationLimitExceeded_closure - ghczminternal_GHCziInternalziIOziException_stackOverflow_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactFunction_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactPinned_closure - ghczminternal_GHCziInternalziIOziException_cannotCompactMutable_closure - ghczminternal_GHCziInternalziControlziExceptionziBase_nonTermination_closure - ghczminternal_GHCziInternalziControlziExceptionziBase_nestedAtomically_closure - ghczminternal_GHCziInternalziExceptionziType_divZZeroException_closure - ghczminternal_GHCziInternalziExceptionziType_underflowException_closure - ghczminternal_GHCziInternalziExceptionziType_overflowException_closure ===================================== rts/win32/libHSghc-prim.def deleted ===================================== @@ -1,14 +0,0 @@ - -LIBRARY "libHSghc-internal-@LibVersion@-ghc@ProjectVersion@.dll" - -EXPORTS - - ghczminternal_GHCziInternalziTypes_True_closure - ghczminternal_GHCziInternalziTypes_False_closure - ghczminternal_GHCziInternalziTypes_Czh_con_info - ghczminternal_GHCziInternalziTypes_Izh_con_info - ghczminternal_GHCziInternalziTypes_Fzh_con_info - ghczminternal_GHCziInternalziTypes_Dzh_con_info - ghczminternal_GHCziInternalziTypes_Wzh_con_info - ghczminternal_GHCziInternalziTypes_Czh_static_info - ghczminternal_GHCziInternalziTypes_Izh_static_info View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/29b8a74d56e2bbc919a9a6d2d3306c2... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/29b8a74d56e2bbc919a9a6d2d3306c2... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)