Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: b7a93684 by Simon Peyton Jones at 2025-08-12T18:49:11-04:00 Make injecting implicit bindings into its own pass Previously we were injecting "impliicit bindings" (data constructor worker and wrappers etc) - both at the end of CoreTidy, - and at the start of CorePrep This is unpleasant and confusing. This patch puts it it its own pass, addImplicitBinds, which runs between the two. The function `GHC.CoreToStg.AddImplicitBinds.addImplicitBinds` now takes /all/ TyCons, not just the ones for algebraic data types. That change ripples through to - corePrepPgm - doCodeGen - byteCodeGen All take [TyCon] which includes all TyCons - - - - - ddf4648b by Simon Peyton Jones at 2025-08-12T18:49:11-04:00 Implement unary classes The big change is described exhaustively in Note [Unary class magic] in GHC.Core.TyCon Other changes * We never unbox class dictionaries in worker/wrapper. This has been true for some time now, but the logic is now centralised in functions in GHC.Core.Opt.WorkWrap.Utils, namely `canUnboxTyCon`, and `canUnboxArg` See Note [Do not unbox class dictionaries] in GHC.Core.Opt.WorkWrap.Utils. * Refactored the `notWorthFloating` logic in GHc.Core.Opt.SetLevels. I can't remember if I actually changed any behaviour here, but if so it's only in a corner cases. * Fixed a bug in `GHC.Core.TyCon.isEnumerationTyCon`, which was wrongly returning True for (##). * Remove redundant Role argument to `liftCoSubstWithEx`. It was always Representational. * I refactored evidence generation in the constraint solver: * Made GHC.Tc.Types.Evidence contain better abstactions for evidence generation. * I deleted the file `GHC.Tc.Types.EvTerm` and merged its (small) contents elsewhere. It wasn't paying its way. * Made evidence for implicit parameters go via a proper abstraction. * Fix inlineBoringOk; see (IB6) in Note [inlineBoringOk] This fixes a slowdown in `countdownEffectfulDynLocal` in the `effectful` library. Smaller things * Rename `isDataTyCon` to `isBoxedDataTyCon`. * GHC.Core.Corecion.liftCoSubstWithEx was only called with Representational role, so I baked that into the function and removed the argument. * Get rid of `GHC.Core.TyCon.tyConSingleAlgDataCon_maybe` in favour of calling `not isNewTyCon` at the call sites; more explicit. * Refatored `GHC.Core.TyCon.isInjectiveTyCon`; but I don't think I changed its behaviour * Moved `decomposeIPPred` to GHC.Core.Predicate Compile time performance changes: geo. mean +0.1% minimum -6.8% maximum +14.4% The +14% one is in T21839c, where it seems that a bit more inlining is taking place. That seems acceptable; and the average change is small Metric Decrease: LargeRecord T12227 T16577 T21839r T5642 Metric Increase: T15164 T21839c T3294 T5321FD T5321Fun WWRec - - - - - 6d7c46ff by Simon Peyton Jones at 2025-08-12T18:49:11-04:00 Slight improvement to pre/postInlineUnconditionally Avoids an extra simplifier iteration - - - - - 41b20bc5 by Simon Peyton Jones at 2025-08-12T18:49:11-04:00 Fix a long-standing assertion error in normSplitTyConApp_maybe - - - - - d579c1ff by Simon Peyton Jones at 2025-08-12T18:49:11-04:00 Add comment to coercion optimiser - - - - - 8703b787 by Florian Ragwitz at 2025-08-12T18:49:13-04:00 Extend record-selector usage ticking to all binds using a record field This extends the previous handling of ticking for RecordWildCards and NamedFieldPuns to all var bindings that involve record selectors. Note that certain patterns such as `Foo{foo = 42}` will currently not tick the `foo` selector, as ticking is triggered by `HsVar`s. Closes #26191. - - - - - 68538205 by Florian Ragwitz at 2025-08-12T18:49:13-04:00 Add release notes for 9.16.1 and move description of latest HPC changes there. - - - - - 011749c7 by Ben Gamari at 2025-08-12T18:49:15-04:00 rts: Clarify rationale for undefined atomic wrappers Since c06e3f46d24ef69f3a3d794f5f604cb8c2a40cbc the RTS has declared various atomic operation wrappers defined by ghc-internal as undefined. While the rationale for this isn't clear from the commit message, I believe that this is necessary due to the unregisterised backend. Specifically, the code generator will reference these symbols when compiling RTS Cmm sources. - - - - - 2a1e4d62 by Andreas Klebinger at 2025-08-12T18:49:17-04:00 Make unexpected LLVM versions a warning rather than an error. Typically a newer LLVM version *will* work so erroring out if a user uses a newer LLVM version is too aggressive. Fixes #25915 - - - - - ad4d6b2b by Teo Camarasu at 2025-08-12T18:49:19-04:00 template-haskell: move some identifiers from ghc-internal to template-haskell These identifiers are not used internally by the compiler. Therefore we have no reason for them to be in ghc-internal. By moving them to template-haskell, we benefit from it being easier to change them and we avoid having to build them in stage0. Resolves #26048 - - - - - 21b8192a by Teo Camarasu at 2025-08-12T18:49:19-04:00 template-haskell: transfer $infix note to public module This Haddock note should be in the public facing module - - - - - 2bbf03e4 by Simon Hengel at 2025-08-12T18:49:21-04:00 Report -pgms as a deprecated flag (instead of reporting an unspecific warning) Before: on the commandline: warning: Object splitting was removed in GHC 8.8 After: on the commandline: warning: [GHC-53692] [-Wdeprecated-flags] -pgms is deprecated: Object splitting was removed in GHC 8.8 - - - - - be3df86c by Zubin Duggal at 2025-08-12T18:49:22-04:00 testsuite: Be more permissive when filtering out GNU_PROPERTY_TYPE linker warnings The warning text is slightly different with ld.bfd. Fixes #26249 - - - - - db539d36 by Oleg Grenrus at 2025-08-12T18:49:24-04:00 Allow defining HasField instances for naughty fields Resolves #26295 ... as HasField solver doesn't solve for fields with "naughty" selectors, we could as well allow defining HasField instances for these fields. - - - - - 25aea95c by Sylvain Henry at 2025-08-12T18:49:49-04:00 Fix Data.List unqualified import warning - - - - - 118 changed files: - compiler/GHC/Builtin/Types.hs - compiler/GHC/ByteCode/InfoTable.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/TyCo/Rep.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Unfold.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg.hs - + compiler/GHC/CoreToStg/AddImplicitBinds.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Foreign/Call.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Runtime/Debugger/Breakpoints.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Gen/Bind.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Instance/Class.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Solver/Solve.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Build.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/GHC/Tc/TyCl/PatSyn.hs - compiler/GHC/Tc/TyCl/Utils.hs - − compiler/GHC/Tc/Types/EvTerm.hs - compiler/GHC/Tc/Types/Evidence.hs - compiler/GHC/Tc/Utils/TcMType.hs - compiler/GHC/Tc/Validity.hs - compiler/GHC/Types/Demand.hs - compiler/GHC/Types/Id.hs - compiler/GHC/Types/Id/Make.hs - compiler/GHC/Types/RepType.hs - compiler/GHC/Types/TyThing.hs - compiler/ghc.cabal.in - − docs/users_guide/9.14.1-notes.rst - + docs/users_guide/9.16.1-notes.rst - docs/users_guide/release-notes.rst - libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs - libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs - libraries/template-haskell/Language/Haskell/TH/Lib.hs - libraries/template-haskell/Language/Haskell/TH/Quote.hs - libraries/template-haskell/Language/Haskell/TH/Syntax.hs - rts/external-symbols.list.in - rts/rts.cabal - testsuite/driver/testlib.py - testsuite/tests/core-to-stg/T24124.stderr - testsuite/tests/deSugar/should_compile/T2431.stderr - testsuite/tests/dmdanal/should_compile/T16029.stdout - testsuite/tests/dmdanal/sigs/T21119.stderr - testsuite/tests/dmdanal/sigs/T21888.stderr - testsuite/tests/ghci.debugger/scripts/break011.stdout - testsuite/tests/ghci.debugger/scripts/break024.stdout - testsuite/tests/hpc/recsel/recsel.hs - testsuite/tests/hpc/recsel/recsel.stdout - testsuite/tests/indexed-types/should_compile/T2238.hs - testsuite/tests/interface-stability/template-haskell-exports.stdout - testsuite/tests/numeric/should_compile/T15547.stderr - testsuite/tests/numeric/should_compile/T23907.stderr - + testsuite/tests/overloadedrecflds/should_run/T26295.hs - + testsuite/tests/overloadedrecflds/should_run/T26295.stdout - testsuite/tests/overloadedrecflds/should_run/all.T - testsuite/tests/roles/should_compile/Roles14.stderr - testsuite/tests/roles/should_compile/Roles3.stderr - testsuite/tests/roles/should_compile/Roles4.stderr - testsuite/tests/simplCore/should_compile/DataToTagFamilyScrut.stderr - testsuite/tests/simplCore/should_compile/T15205.stderr - testsuite/tests/simplCore/should_compile/T17366.stderr - testsuite/tests/simplCore/should_compile/T17966.stderr - testsuite/tests/simplCore/should_compile/T22309.stderr - testsuite/tests/simplCore/should_compile/T22375DataFamily.stderr - testsuite/tests/simplCore/should_compile/T23307.stderr - testsuite/tests/simplCore/should_compile/T23307a.stderr - testsuite/tests/simplCore/should_compile/T25389.stderr - testsuite/tests/simplCore/should_compile/T25713.stderr - testsuite/tests/simplCore/should_compile/T7360.stderr - testsuite/tests/simplStg/should_compile/T15226b.stderr - testsuite/tests/tcplugins/CtIdPlugin.hs - testsuite/tests/typecheck/should_compile/Makefile - testsuite/tests/typecheck/should_compile/T12763.stderr - testsuite/tests/typecheck/should_compile/T14774.stdout - testsuite/tests/typecheck/should_compile/T18406b.stderr - testsuite/tests/typecheck/should_compile/T18529.stderr - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/unboxedsums/unpack_sums_7.stdout - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs - testsuite/tests/wasm/should_run/control-flow/RunWasm.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/423d9752652df8cc307d24061ff98af... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/423d9752652df8cc307d24061ff98af... You're receiving this email because of your account on gitlab.haskell.org.