-
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