diff options
Diffstat (limited to 'compiler/GHC/Driver/Config.hs')
-rw-r--r-- | compiler/GHC/Driver/Config.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Config.hs b/compiler/GHC/Driver/Config.hs new file mode 100644 index 0000000000..b67e74eeb4 --- /dev/null +++ b/compiler/GHC/Driver/Config.hs @@ -0,0 +1,25 @@ +-- | Subsystem configuration +module GHC.Driver.Config + ( initOptCoercionOpts + , initSimpleOptOpts + ) +where + +import GHC.Prelude + +import GHC.Driver.Session +import GHC.Core.SimpleOpt +import GHC.Core.Coercion.Opt + +-- | Initialise coercion optimiser configuration from DynFlags +initOptCoercionOpts :: DynFlags -> OptCoercionOpts +initOptCoercionOpts dflags = OptCoercionOpts + { optCoercionEnabled = not (hasNoOptCoercion dflags) + } + +-- | Initialise Simple optimiser configuration from DynFlags +initSimpleOptOpts :: DynFlags -> SimpleOptOpts +initSimpleOptOpts dflags = SimpleOptOpts + { so_uf_opts = unfoldingOpts dflags + , so_co_opts = initOptCoercionOpts dflags + } |