
Hannes Siebenhandl pushed to branch wip/fendor/t23812 at Glasgow Haskell Compiler / GHC Commits: 62f51fad by Finley McIlwaine at 2025-09-01T10:56:54+02:00 Refactor distinct constructor tables map construction Adds `GHC.Types.Unique.Map.alterUniqMap_L`, `GHC.Types.Unique.FM.alterUFM_L`, `GHC.Data.Word64Map.alterLookupWithKey` to support fusion of distinct constructor data insertion and lookup during the construction of the data con map in `GHC.Stg.Debug.numberDataCon`. - - - - - 561a1835 by Finley McIlwaine at 2025-09-01T10:57:59+02:00 Allow per constructor refinement of distinct-constructor-tables Introduce `-fno-distinct-constructor-tables`. A distinct constructor table configuration is built from the combination of flags given, in order. For example, to create distinct constructor tables for all constructors except for a specific few named `C1`,..., `CN`, pass `-fdistinct-contructor-tables` followed by `fno-distinct-constructor-tables=C1,...,CN`. To only generate distinct constuctor tables for a few specific constructors and no others, just pass `-fdistinct-constructor-tables=C1,...,CN`. The various configurations of these flags is included in the `DynFlags` fingerprints, which should result in the expected recompilation logic. Adds a test that checks for distinct tables for various given or omitted constructors. Updates CountDepsAst and CountDepsParser tests to account for new dependencies. Fixes #23703 - - - - - 59f3f686 by Finley McIlwaine at 2025-09-01T10:58:56+02:00 Add -f{no-}distinct-constructor-tables-per-module With -fdistinct-constructor-tables-per-module, only one info table will be created for all equivalent constructors used in the same module. Just like `-f{no-}distinct-constructor-tables`, these flags can also be given a comma-separated list of constructor names to specify exactly which constructors this behavior should apply to. This commit alters the distinct-tables test to also test the behavior of these flags. Fixes #23812 - - - - - 41 changed files: - compiler/GHC/Cmm/CLabel.hs - compiler/GHC/CoreToStg.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Driver/Config/Stg/Debug.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/GenerateCgIPEStub.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Iface/Flags.hs - compiler/GHC/Iface/Recomp/Flags.hs - compiler/GHC/Stg/Debug.hs - + compiler/GHC/Stg/Debug/Types.hs - compiler/GHC/Stg/Syntax.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/DataCon.hs - compiler/GHC/StgToCmm/Layout.hs - compiler/GHC/StgToCmm/Ticky.hs - compiler/GHC/StgToCmm/Utils.hs - compiler/GHC/Types/IPE.hs - compiler/GHC/Types/Unique/DFM.hs - compiler/GHC/Types/Unique/FM.hs - compiler/GHC/Types/Unique/Map.hs - compiler/ghc.cabal.in - docs/users_guide/debug-info.rst - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - + testsuite/tests/rts/ipe/distinct-tables/Main.hs - + testsuite/tests/rts/ipe/distinct-tables/Makefile - + testsuite/tests/rts/ipe/distinct-tables/X.hs - + testsuite/tests/rts/ipe/distinct-tables/all.T - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables01.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables02.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables03.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables04.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables05.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables06.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables07.stdout - + testsuite/tests/rts/ipe/distinct-tables/distinct_tables08.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5b8f2fff4837073fa91caa12a7e4ed0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5b8f2fff4837073fa91caa12a7e4ed0... You're receiving this email because of your account on gitlab.haskell.org.