module GHC.Driver.Config.Core.Opt.LiberateCase
  ( initLiberateCaseOpts
  ) where

import GHC.Driver.DynFlags

import GHC.Core.Opt.LiberateCase ( LibCaseOpts(..) )

-- | Initialize configuration for the liberate case Core optimization
-- pass.
initLiberateCaseOpts :: DynFlags -> LibCaseOpts
initLiberateCaseOpts :: DynFlags -> LibCaseOpts
initLiberateCaseOpts DynFlags
dflags = LibCaseOpts
  { lco_threshold :: Maybe Int
lco_threshold = DynFlags -> Maybe Int
liberateCaseThreshold DynFlags
dflags
  , lco_unfolding_opts :: UnfoldingOpts
lco_unfolding_opts = DynFlags -> UnfoldingOpts
unfoldingOpts DynFlags
dflags
  }