[Git][ghc/ghc][wip/enable-poly-spec] compiler: Enable polymorphic-specialisation

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 compiler: Enable polymorphic-specialisation The remaining hazards to soundness should be addressed by #23109. - - - - - 3 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - docs/users_guide/using-optimisation.rst Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -1250,6 +1250,7 @@ optLevelFlags -- see Note [Documenting optimisation flags] , ([1,2], Opt_CfgBlocklayout) -- Experimental , ([1,2], Opt_Specialise) + , ([1,2], Opt_PolymorphicSpecialisation) , ([1,2], Opt_CrossModuleSpecialise) , ([1,2], Opt_InlineGenerics) , ([1,2], Opt_Strictness) ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -907,6 +907,7 @@ optimisationFlags = EnumSet.fromList , Opt_SpecialiseAggressively , Opt_CrossModuleSpecialise , Opt_StaticArgumentTransformation + , Opt_PolymorphicSpecialisation , Opt_CSE , Opt_StgCSE , Opt_StgLiftLams ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -1325,10 +1325,7 @@ as such you shouldn't need to set any of them explicitly. A flag :reverse: -fno-polymorphic-specialisation :category: - :default: off - - Warning, this feature is highly experimental and may lead to incorrect runtime - results. Use at your own risk (:ghc-ticket:`23469`, :ghc-ticket:`23109`, :ghc-ticket:`21229`, :ghc-ticket:`23445`). + :default: on Enable specialisation of function calls to known dictionaries with free type variables. The created specialisation will abstract over the type variables free in the dictionary. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b73e66fbcca239c37ea8d07120bc729d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b73e66fbcca239c37ea8d07120bc729d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Ben Gamari (@bgamari)