summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-07-07 17:12:48 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-22 20:20:34 -0400
commit15ce1804d2b87ac7bd55632957a4cb897decbbee (patch)
treee0690615a367a3a63ba10174e655952ed3ab167c
parentf7cc431341e5b5b31758eecc8504cae8b2390c10 (diff)
downloadhaskell-15ce1804d2b87ac7bd55632957a4cb897decbbee.tar.gz
Deprecate -fdmd-tx-dict-sel.
It's behaviour is now unconditionally enabled as it's slightly beneficial. There are almost no benchmarks which benefit from disabling it, so it's not worth the keep this configurable. This fixes #18429.
-rw-r--r--compiler/GHC/Core/Opt/DmdAnal.hs5
-rw-r--r--compiler/GHC/Driver/Flags.hs3
-rw-r--r--compiler/GHC/Driver/Session.hs4
-rw-r--r--docs/users_guide/using-optimisation.rst4
4 files changed, 9 insertions, 7 deletions
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index 7f4327591e..e11d220773 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -486,8 +486,9 @@ dmdTransform env var dmd
| isDataConWorkId var
= dmdTransformDataConSig (idArity var) dmd
-- Dictionary component selectors
- | gopt Opt_DmdTxDictSel (ae_dflags env),
- Just _ <- isClassOpId_maybe var
+ -- Used to be controlled by a flag.
+ -- See #18429 for some perf measurements.
+ | Just _ <- isClassOpId_maybe var
= dmdTransformDictSelSig (idStrictness var) dmd
-- Imported functions
| isGlobalId var
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
index f5f642ce46..1b437c3235 100644
--- a/compiler/GHC/Driver/Flags.hs
+++ b/compiler/GHC/Driver/Flags.hs
@@ -188,7 +188,8 @@ data GeneralFlag
| Opt_OmitYields
| Opt_FunToThunk -- allow GHC.Core.Opt.WorkWrap.Utils.mkWorkerArgs to remove all value lambdas
| Opt_DictsStrict -- be strict in argument dictionaries
- | Opt_DmdTxDictSel -- use a special demand transformer for dictionary selectors
+ | Opt_DmdTxDictSel -- ^ deprecated, no effect and behaviour is now default.
+ -- Allowed switching of a special demand transformer for dictionary selectors
| Opt_Loopification -- See Note [Self-recursive tail calls]
| Opt_CfgBlocklayout -- ^ Use the cfg based block layout algorithm.
| Opt_WeightlessBlocklayout -- ^ Layout based on last instruction per block.
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 82be1ab02e..c7fd59e1b3 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -3472,7 +3472,8 @@ fFlagsDeps = [
flagSpec "diagnostics-show-caret" Opt_DiagnosticsShowCaret,
flagSpec "dicts-cheap" Opt_DictsCheap,
flagSpec "dicts-strict" Opt_DictsStrict,
- flagSpec "dmd-tx-dict-sel" Opt_DmdTxDictSel,
+ depFlagSpec "dmd-tx-dict-sel"
+ Opt_DmdTxDictSel "effect is now unconditionally enabled",
flagSpec "do-eta-reduction" Opt_DoEtaReduction,
flagSpec "do-lambda-eta-expansion" Opt_DoLambdaEtaExpansion,
flagSpec "eager-blackholing" Opt_EagerBlackHoling,
@@ -4004,7 +4005,6 @@ optLevelFlags :: [([Int], GeneralFlag)]
optLevelFlags -- see Note [Documenting optimisation flags]
= [ ([0,1,2], Opt_DoLambdaEtaExpansion)
, ([0,1,2], Opt_DoEtaReduction) -- See Note [Eta-reduction in -O0]
- , ([0,1,2], Opt_DmdTxDictSel)
, ([0,1,2], Opt_LlvmTBAA)
, ([0], Opt_IgnoreInterfacePragmas)
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 438560c481..4c44509f21 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -353,8 +353,7 @@ by saying ``-fno-wombat``.
Make dictionaries strict.
.. ghc-flag:: -fdmd-tx-dict-sel
- :shortdesc: Use a special demand transformer for dictionary selectors.
- Always enabled by default.
+ :shortdesc: *(deprecated)* Use a special demand transformer for dictionary selectors.
:type: dynamic
:reverse: -fno-dmd-tx-dict-sel
:category:
@@ -362,6 +361,7 @@ by saying ``-fno-wombat``.
:default: on
Use a special demand transformer for dictionary selectors.
+ Behaviour is unconditionally enabled starting with 8.14
.. ghc-flag:: -fdo-eta-reduction
:shortdesc: Enable eta-reduction. Implied by :ghc-flag:`-O`.