[Git][ghc/ghc][wip/t23812] 2 commits: Allow per constructor refinement of distinct-constructor-tables

Finley McIlwaine (@FinleyMcIlwaine) gitlab at gitlab.haskell.org
Tue Sep 12 19:28:07 UTC 2023



Finley McIlwaine pushed to branch wip/t23812 at Glasgow Haskell Compiler / GHC


Commits:
86c49072 by Finley McIlwaine at 2023-09-12T12:27:33-07: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 configuations 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

- - - - -
2012015f by Finley McIlwaine at 2023-09-12T12:27:57-07: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

- - - - -


30 changed files:

- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CoreToStg.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/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.cabal.in
- docs/users_guide/9.10.1-notes.rst
- docs/users_guide/debug-info.rst
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- + testsuite/tests/rts/ipe/distinct-tables/ACon.out
- + testsuite/tests/rts/ipe/distinct-tables/AConBCon.out
- + testsuite/tests/rts/ipe/distinct-tables/BCon.out
- + testsuite/tests/rts/ipe/distinct-tables/CCon.out
- + testsuite/tests/rts/ipe/distinct-tables/Main.hs
- + testsuite/tests/rts/ipe/distinct-tables/Makefile


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e70dda48f2c1385e92e132822397c8aa1a9443e1...2012015f43975cb1d1af267030b44eda599ceb56

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e70dda48f2c1385e92e132822397c8aa1a9443e1...2012015f43975cb1d1af267030b44eda599ceb56
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230912/6071f6ad/attachment.html>


More information about the ghc-commits mailing list