summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Config
diff options
context:
space:
mode:
authorDominik Peteler <haskell+gitlab@with-h.at>2022-04-18 14:20:58 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-22 21:58:23 -0400
commitffbe28e56aa382164525300fbc32d78eefd95e7d (patch)
tree05097a92e316ab10d8dd3e3b0647af0a2048d254 /compiler/GHC/Driver/Config
parentea895b94afeecb111f8001fbd60f5d4c8828213c (diff)
downloadhaskell-ffbe28e56aa382164525300fbc32d78eefd95e7d.tar.gz
Modularize GHC.Core.Opt.LiberateCasewip/cmm-dominators
Progress towards #17957
Diffstat (limited to 'compiler/GHC/Driver/Config')
-rw-r--r--compiler/GHC/Driver/Config/Core/Opt/LiberateCase.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Config/Core/Opt/LiberateCase.hs b/compiler/GHC/Driver/Config/Core/Opt/LiberateCase.hs
new file mode 100644
index 0000000000..c06ca62e5c
--- /dev/null
+++ b/compiler/GHC/Driver/Config/Core/Opt/LiberateCase.hs
@@ -0,0 +1,15 @@
+module GHC.Driver.Config.Core.Opt.LiberateCase
+ ( initLiberateCaseOpts
+ ) where
+
+import GHC.Driver.Session
+
+import GHC.Core.Opt.LiberateCase ( LibCaseOpts(..) )
+
+-- | Initialize configuration for the liberate case Core optomization
+-- pass.
+initLiberateCaseOpts :: DynFlags -> LibCaseOpts
+initLiberateCaseOpts dflags = LibCaseOpts
+ { lco_threshold = liberateCaseThreshold dflags
+ , lco_unfolding_opts = unfoldingOpts dflags
+ }