Zubin pushed to branch wip/9.14.2-backports at Glasgow Haskell Compiler / GHC Commits: 13a52ca3 by sheaf at 2026-07-20T13:12:14+05:30 Avoid mkTick in Core Prep breaking ANF As discovered in #27182, mkTick can break ANF. This patch introduces a variant of mkTick that skips the single optimisation that could break ANF. This is preferrable over switching to the raw Tick constructor, as the latter may introduce spurious cost centres in profiling reports. This is a temporary measure until we more thoroughly refactor how mkTick works (see #27141). See Note [mkTick breaks ANF] in GHC.CoreToStg.Prep. Fixes #27182 (cherry picked from commit f9bcfac2e92457128f5c82dea181edcd0baf7eef) - - - - - 289f1eb1 by sheaf at 2026-07-20T13:12:14+05:30 Don't drop ticks around variables of type `IO ()` GHC.Core.Utils.mkTick is responsible for placing a tick on a Core expression. It contains logic for dropping SCCs (non-counting profiling ticks) around non-function variables, as such variables cannot meaningfully contribute to profiles. However, the logic for what counts as a function was incorrect: it used `isFunTy` which returns 'False' for types such as 'IO ()' where the function arrow is hidden under a newtype. We now use 'mightBeFunTy' instead of 'isFunTy'. This ensures we don't drop ticks in cases we aren't sure. On the way, we improve the documentation of 'isFunTy', 'isPiTy' and 'mightBeFunTy', and update the latter's implementation to consistently handle unary classes. Fixes #27225 ------------------------- Metric Decrease: T5642 ------------------------- (cherry picked from commit ce01ccb625514a09e76aded549691da4dfe87de7) - - - - - d1ad134c by sheaf at 2026-07-20T13:12:14+05:30 Avoid mkTick in Core Prep breaking ANF (part II) Hotfix for 2f9579765f55b3920ceb2e04995ff41a9d0e2d4e fixing a small oversight in the call to tickTickedExpr from mkTick, in which we improperly recursively called mkTick without passing on the preserve_anf flag. Fixes #27386 (cherry picked from commit 473b97ebc742305f56e30d5b1bbf95b7681312f0) - - - - - df973ff7 by Ian-Woo Kim at 2026-07-20T13:12:14+05:30 Make the order of usages deterministic It has been observed that the ordering of usages can be non-determinstic in parallel builds. Therefore, this contribution introduces sorting of usages based on a platform- and race-independent sorting criterion. Resolves #26877. Co-authored-by: Wolfgang Jeltsch <wolfgang@well-typed.com> (cherry picked from commit d216412babfd5b5746365f0686ec370fb0892ec7) - - - - - 72d595e5 by Wolfgang Jeltsch at 2026-07-20T13:12:14+05:30 Change the descriptions of two existing changelog entries The descriptions now describe the changes in a user-friendly manner, as opposed to describing the contributions that led to these changes in a developer-friendly manner. (cherry picked from commit 8e1cc105acae69b1fabd1a9b89e2d1823861f518) - - - - - 8d5a1f45 by Andrea Vezzosi at 2026-07-20T13:12:14+05:30 [Fix #27287] preserve ModBreaks in ModIface (cherry picked from commit 4396a6f2a4c7799908e1e0b88a218a51d063fdca) - - - - - 44 changed files: - + changelog.d/T27182.md - + changelog.d/T27225 - + changelog.d/T27386 - + changelog.d/deterministic-usage-order - changelog.d/more-efficient-home-unit-imports-finding - compiler/GHC/ByteCode/Breakpoints.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/HsToCore/Breakpoints.hs - + compiler/GHC/HsToCore/Breakpoints/Types.hs - compiler/GHC/HsToCore/Usage.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Iface/Make.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Runtime/Interpreter.hs - compiler/GHC/Types/RepType.hs - compiler/GHC/Unit/Module/Deps.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/GHC/Unit/Module/ModIface.hs - compiler/GHC/Unit/Module/WholeCoreBindings.hs - compiler/GHC/Utils/Binary.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/ghci/should_run/Makefile - + testsuite/tests/ghci/should_run/T27287.hs - + testsuite/tests/ghci/should_run/T27287.stdout - testsuite/tests/ghci/should_run/all.T - + testsuite/tests/profiling/should_compile/T27182.hs - + testsuite/tests/profiling/should_compile/T27386.hs - testsuite/tests/profiling/should_compile/all.T - + testsuite/tests/profiling/should_run/T27225.hs - + testsuite/tests/profiling/should_run/T27225.stdout - + testsuite/tests/profiling/should_run/T27225b.hs - + testsuite/tests/profiling/should_run/T27225b.stdout - testsuite/tests/profiling/should_run/all.T - testsuite/tests/profiling/should_run/caller-cc/CallerCc1.prof.sample - testsuite/tests/profiling/should_run/callstack001.stdout - testsuite/tests/profiling/should_run/scc001.prof.sample The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/883a75bd123f85bdb4cd27622447506... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/883a75bd123f85bdb4cd27622447506... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Zubin (@wz1000)