summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Unfold.hs-boot
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-12-16 12:57:17 +0000
committerAndreas Klebinger <klebinger.andreas@gmx.at>2021-02-04 13:07:24 +0100
commit12e73378106efb1b6acac45731a67a3e9fa689cb (patch)
treeae32c7edd65d9a799bf16bae4a0f1ba767ffa35a /compiler/GHC/Core/Unfold.hs-boot
parentddbdec4128f0e6760c8c7a19344f2f2a7a3314bf (diff)
downloadhaskell-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/Core/Unfold.hs-boot')
-rw-r--r--compiler/GHC/Core/Unfold.hs-boot2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Core/Unfold.hs-boot b/compiler/GHC/Core/Unfold.hs-boot
index b86f8b2585..c62f1915c9 100644
--- a/compiler/GHC/Core/Unfold.hs-boot
+++ b/compiler/GHC/Core/Unfold.hs-boot
@@ -11,3 +11,5 @@ updateUseThreshold :: Int -> UnfoldingOpts -> UnfoldingOpts
updateFunAppDiscount :: Int -> UnfoldingOpts -> UnfoldingOpts
updateDictDiscount :: Int -> UnfoldingOpts -> UnfoldingOpts
updateVeryAggressive :: Bool -> UnfoldingOpts -> UnfoldingOpts
+updateCaseThreshold :: Int -> UnfoldingOpts -> UnfoldingOpts
+updateCaseScaling :: Int -> UnfoldingOpts -> UnfoldingOpts