diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-12-16 12:57:17 +0000 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-02-04 13:07:24 +0100 |
commit | 12e73378106efb1b6acac45731a67a3e9fa689cb (patch) | |
tree | ae32c7edd65d9a799bf16bae4a0f1ba767ffa35a /compiler/GHC/Driver/Session.hs | |
parent | ddbdec4128f0e6760c8c7a19344f2f2a7a3314bf (diff) | |
download | haskell-wip/T18730.tar.gz |
Reduce inlining in deeply-nested caseswip/T18730
This adds a new heuristic, controllable via two new flags to
better tune inlining behaviour.
The new flags are -funfolding-case-threshold and
-funfolding-case-scaling which are document both
in the user guide and in
Note [Avoid inlining into deeply nested cases].
Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 85f1b71852..cee4ba692b 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -2845,6 +2845,11 @@ dynamic_flags_deps = [ , make_ord_flag defFlag "funfolding-dict-discount" (intSuffix (\n d -> d { unfoldingOpts = updateDictDiscount n (unfoldingOpts d)})) + , make_ord_flag defFlag "funfolding-case-threshold" + (intSuffix (\n d -> d { unfoldingOpts = updateCaseThreshold n (unfoldingOpts d)})) + , make_ord_flag defFlag "funfolding-case-scaling" + (intSuffix (\n d -> d { unfoldingOpts = updateCaseScaling n (unfoldingOpts d)})) + , make_dep_flag defFlag "funfolding-keeness-factor" (floatSuffix (\_ d -> d)) "-funfolding-keeness-factor is no longer respected as of GHC 9.0" |