[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: Use half-word literals in info tables
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 472df471 by Peter Trommler at 2026-01-08T13:28:54-05:00 Use half-word literals in info tables With this commit info tables are mapped to the same assembler code on big-endian and little-endian platforms. Fixes #26579. - - - - - 393f9c51 by Simon Peyton Jones at 2026-01-08T13:29:35-05:00 Refactor srutOkForBinderSwap This MR does a small refactor: * Moves `scrutOkForBinderSwap` and `BinderSwapDecision` to GHC.Core.Utils * Inverts the sense of the coercion it returns, which makes more sense No effect on behaviour - - - - - ad76fb0f by Simon Peyton Jones at 2026-01-08T13:29:36-05:00 Improve case merging This small MR makes case merging happen a bit more often than it otherwise could, by getting join points out of the way. See #26709 and GHC.Core.Utils Note [Floating join points out of DEFAULT alternatives] - - - - - 4c9395f5 by Cheng Shao at 2026-01-08T13:30:16-05:00 hadrian: remove broken hsc2hs flag when cross compiling to windows This patch removes the `--via-asm` hsc2hs flag when cross compiling to windows. With recent llvm-mingw toolchain, it would fail with: ``` x86_64-w64-mingw32-hsc2hs: Cannot combine instructions: [Quad 8,Long 4,Long 241,Ref ".Ltmp1-.Ltmp0"] ``` The hsc2hs default `--cross-compile` logic is slower but works. - - - - - 71fdef55 by Simon Peyton Jones at 2026-01-08T13:30:57-05:00 Try harder to keep the substitution empty Avoid unnecessary cloning of variables in the Simplifier. Addresses #26724, See Note [Keeping the substitution empty] We get some big wins in compile time Metrics: compile_time/bytes allocated ------------------------------------- Baseline Test Metric value New value Change ---------------------------------------------------------------------------- CoOpt_Singletons(normal) ghc/alloc 721,544,088 692,174,216 -4.1% GOOD LargeRecord(normal) ghc/alloc 1,268,031,157 1,265,168,448 -0.2% T14766(normal) ghc/alloc 918,218,533 688,432,296 -25.0% GOOD T15703(normal) ghc/alloc 318,103,629 306,638,016 -3.6% GOOD T17836(normal) ghc/alloc 419,174,584 418,400,824 -0.2% T18478(normal) ghc/alloc 471,042,976 470,261,376 -0.2% T20261(normal) ghc/alloc 573,387,162 563,663,336 -1.7% T24984(normal) ghc/alloc 87,832,666 87,636,168 -0.2% T25196(optasm) ghc/alloc 1,103,284,040 1,101,376,992 -0.2% hard_hole_fits(normal) ghc/alloc 224,981,413 224,608,208 -0.2% geo. mean -0.3% minimum -25.0% maximum +0.1% Metric Decrease: CoOpt_Singletons T14766 T15703 - - - - - 30341168 by Simon Peyton Jones at 2026-01-08T13:31:38-05:00 Add regression test for #24867 - - - - - 849ac956 by Julian Ospald at 2026-01-08T17:08:10-05:00 Support statically linking executables properly Fixes #26434 In detail, this does a number of things: * Makes GHC aware of 'extra-libraries-static' (this changes the package database format). * Adds a switch '-static-external' that will honour 'extra-libraries-static' to link external system dependencies statically. * Adds a new field to settings/targets: "ld supports verbatim namespace". This field is used by '-static-external' to conditionally use '-l:foo.a' syntax during linking, which is more robust than trying to find the absolute path to an archive on our own. * Adds a switch '-fully-static' that is meant as a high-level interface for e.g. cabal. This also honours 'extra-libraries-static'. This also attempts to clean up the confusion around library search directories. At the moment, we have 3 types of directories in the package database format: * library-dirs * library-dirs-static * dynamic-library-dirs However, we only have two types of linking: dynamic or static. Given the existing logic in 'mungeDynLibFields', this patch assumes that 'library-dirs' is really just nothing but a fallback and always prefers the more specific variants if they exist and are non-empty. Conceptually, we should be ok with even just one search dirs variant. Haskell libraries are named differently depending on whether they're static or dynamic, so GHC can conveniently pick the right one depending on the linking needs. That means we don't really need to play tricks with search paths to convince the compiler to do linking as we want it. For system C libraries, the convention has been anyway to place static and dynamic libs next to each other, so we need to deal with that issue anyway and it is outside of our control. But this is out of the scope of this patch. This patch is backwards compatible with cabal. Cabal should however be patched to use the new '-fully-static' switch. - - - - - 6b2bc80e by Julian Ospald at 2026-01-08T17:08:10-05:00 Warn when "-dynamic" is mixed with "-staticlib" - - - - - 48c01fd1 by Matthew Pickering at 2026-01-08T17:08:11-05:00 rts: Use INFO_TABLE_CONSTR for stg_dummy_ret_closure Since the closure type is CONSTR_NOCAF, we need to use INFO_TABLE_CONSTR to populate the constructor description field (this crashes ghc-debug when decoding AP_STACK frames sometimes) Fixes #26745 - - - - - 68 changed files: - compiler/GHC/Cmm/Info.hs - compiler/GHC/Cmm/Utils.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Interpreter.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Linker/Dynamic.hs - compiler/GHC/Linker/Executable.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Unit.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/StgToJS/Linker/Utils.hs - compiler/GHC/Unit/Info.hs - compiler/GHC/Unit/State.hs - configure.ac - distrib/configure.ac.in - docs/users_guide/phases.rst - ghc/Main.hs - hadrian/cfg/default.host.target.in - hadrian/cfg/default.target.in - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Hsc2Hs.hs - libraries/ghc-boot/GHC/Unit/Database.hs - libraries/ghc-internal/ghc-internal.buildinfo.in - libraries/ghc-internal/ghc-internal.cabal.in - + m4/fp_linker_supports_verbatim.m4 - m4/prep_target_file.m4 - mk/system-cxx-std-lib-1.0.conf.in - rts/StgMiscClosures.cmm - rts/configure.ac - rts/rts.buildinfo.in - rts/rts.cabal - + testsuite/driver/_elffile.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/ghc-config/ghc-config.hs - + testsuite/tests/driver/fully-static/Hello.hs - + testsuite/tests/driver/fully-static/Makefile - + testsuite/tests/driver/fully-static/all.T - + testsuite/tests/driver/fully-static/fully-static.stdout - + testsuite/tests/driver/fully-static/test/Test.hs - + testsuite/tests/driver/fully-static/test/test.pkg - + testsuite/tests/driver/mostly-static/Hello.hs - + testsuite/tests/driver/mostly-static/Makefile - + testsuite/tests/driver/mostly-static/all.T - + testsuite/tests/driver/mostly-static/mostly-static.stdout - + testsuite/tests/driver/mostly-static/test/test.c - + testsuite/tests/driver/mostly-static/test/test.h - + testsuite/tests/driver/mostly-static/test/test.pkg - + testsuite/tests/pmcheck/should_compile/T24867.hs - + testsuite/tests/pmcheck/should_compile/T24867.stderr - testsuite/tests/pmcheck/should_compile/all.T - + testsuite/tests/simplCore/should_compile/T26709.hs - + testsuite/tests/simplCore/should_compile/T26709.stderr - testsuite/tests/simplCore/should_compile/all.T - utils/ghc-pkg/Main.hs - utils/ghc-toolchain/exe/Main.hs - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/555d115373b7ca4f91bf97892e420d1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/555d115373b7ca4f91bf97892e420d1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)