X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FFloatIn.lhs;h=36e3d4de70d7a141699ae8ee5dfdb5f4161bec79;hb=63f6b0868f4948232f87bc4df52c9d3a2ec8f184;hp=8dbec27bf5a37272530a4062fa00b66a069372dc;hpb=3e597db13ccc44fdb7791e346ba23f11b27ec9f9;p=ghc-hetmet.git diff --git a/compiler/simplCore/FloatIn.lhs b/compiler/simplCore/FloatIn.lhs index 8dbec27..36e3d4d 100644 --- a/compiler/simplCore/FloatIn.lhs +++ b/compiler/simplCore/FloatIn.lhs @@ -16,10 +16,8 @@ module FloatIn ( floatInwards ) where #include "HsVersions.h" -import DynFlags ( DynFlags, DynFlag(..) ) import CoreSyn import CoreUtils ( exprIsHNF, exprIsDupable ) -import CoreLint ( showPass, endPass ) import CoreFVs ( CoreExprWithFVs, freeVars, freeVarsOf, idRuleVars ) import Id ( isOneShotBndr, idType ) import Var @@ -34,16 +32,8 @@ Top-level interface function, @floatInwards@. Note that we do not actually float any bindings downwards from the top-level. \begin{code} -floatInwards :: DynFlags -> [CoreBind] -> IO [CoreBind] - -floatInwards dflags binds - = do { - showPass dflags "Float inwards"; - let { binds' = map fi_top_bind binds }; - endPass dflags "Float inwards" Opt_D_verbose_core2core binds' - {- no specific flag for dumping float-in -} - } - +floatInwards :: [CoreBind] -> [CoreBind] +floatInwards = map fi_top_bind where fi_top_bind (NonRec binder rhs) = NonRec binder (fiExpr [] (freeVars rhs)) @@ -383,7 +373,7 @@ noFloatIntoRhs (AnnLam b _) = not (is_one_shot b) noFloatIntoRhs rhs = exprIsHNF (deAnnotate' rhs) -- We'd just float right back out again... is_one_shot :: Var -> Bool -is_one_shot b = isIdVar b && isOneShotBndr b +is_one_shot b = isId b && isOneShotBndr b \end{code}