Ben Gamari pushed to branch wip/enable-poly-spec at Glasgow Haskell Compiler / GHC
Commits:
-
b73e66fb
by Ben Gamari at 2025-08-07T19:35:29-04:00
3 changed files:
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- docs/users_guide/using-optimisation.rst
Changes:
... | ... | @@ -1250,6 +1250,7 @@ optLevelFlags -- see Note [Documenting optimisation flags] |
1250 | 1250 | , ([1,2], Opt_CfgBlocklayout) -- Experimental
|
1251 | 1251 | |
1252 | 1252 | , ([1,2], Opt_Specialise)
|
1253 | + , ([1,2], Opt_PolymorphicSpecialisation)
|
|
1253 | 1254 | , ([1,2], Opt_CrossModuleSpecialise)
|
1254 | 1255 | , ([1,2], Opt_InlineGenerics)
|
1255 | 1256 | , ([1,2], Opt_Strictness)
|
... | ... | @@ -907,6 +907,7 @@ optimisationFlags = EnumSet.fromList |
907 | 907 | , Opt_SpecialiseAggressively
|
908 | 908 | , Opt_CrossModuleSpecialise
|
909 | 909 | , Opt_StaticArgumentTransformation
|
910 | + , Opt_PolymorphicSpecialisation
|
|
910 | 911 | , Opt_CSE
|
911 | 912 | , Opt_StgCSE
|
912 | 913 | , Opt_StgLiftLams
|
... | ... | @@ -1325,10 +1325,7 @@ as such you shouldn't need to set any of them explicitly. A flag |
1325 | 1325 | :reverse: -fno-polymorphic-specialisation
|
1326 | 1326 | :category:
|
1327 | 1327 | |
1328 | - :default: off
|
|
1329 | - |
|
1330 | - Warning, this feature is highly experimental and may lead to incorrect runtime
|
|
1331 | - results. Use at your own risk (:ghc-ticket:`23469`, :ghc-ticket:`23109`, :ghc-ticket:`21229`, :ghc-ticket:`23445`).
|
|
1328 | + :default: on
|
|
1332 | 1329 | |
1333 | 1330 | Enable specialisation of function calls to known dictionaries with free type variables.
|
1334 | 1331 | The created specialisation will abstract over the type variables free in the dictionary.
|