X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FLiberateCase.lhs;h=9c51103d7636b4b4d550d079eba0caff61371b88;hb=5952ef0dfd1a9eec38bd2756b37d040feb2b09d8;hp=c29d217b00a794a4596b98f46cdc0b21ce4d1790;hpb=ebd091d5cd703b249838baaa125e6c0fa0fe0e45;p=ghc-hetmet.git diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs index c29d217..9c51103 100644 --- a/compiler/simplCore/LiberateCase.lhs +++ b/compiler/simplCore/LiberateCase.lhs @@ -195,7 +195,8 @@ libCaseBind env (Rec pairs) rhs_small_enough (id,rhs) = idArity id > 0 -- Note [Only functions!] - && couldBeSmallEnoughToInline (bombOutSize env) rhs + && maybe True (\size -> couldBeSmallEnoughToInline size rhs) + (bombOutSize env) \end{code} @@ -349,7 +350,7 @@ topLevel = 0 \begin{code} data LibCaseEnv = LibCaseEnv { - lc_size :: Int, -- Bomb-out size for deciding if + lc_size :: Maybe Int, -- Bomb-out size for deciding if -- potential liberatees are too big. -- (passed in from cmd-line args) @@ -377,7 +378,7 @@ data LibCaseEnv initEnv :: DynFlags -> LibCaseEnv initEnv dflags - = LibCaseEnv { lc_size = specThreshold dflags, + = LibCaseEnv { lc_size = liberateCaseThreshold dflags, lc_lvl = 0, lc_lvl_env = emptyVarEnv, lc_rec_env = emptyVarEnv,