X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FsimplCore%2FFloatIn.lhs;h=29ce8a9dd349084786bfd481eecd670aba1571c3;hb=f7ecf7234c224489be8a5e63fced903b655d92ee;hp=a49aadb682039556fce34d9e33f6527ceb07e2d6;hpb=ca5a4a480d10d61e5b7a52eb4d556e8b8c33e69d;p=ghc-hetmet.git diff --git a/ghc/compiler/simplCore/FloatIn.lhs b/ghc/compiler/simplCore/FloatIn.lhs index a49aadb..29ce8a9 100644 --- a/ghc/compiler/simplCore/FloatIn.lhs +++ b/ghc/compiler/simplCore/FloatIn.lhs @@ -16,16 +16,16 @@ then discover that they aren't needed in the chosen branch. module FloatIn ( floatInwards ) where -import Ubiq{-uitous-} +IMP_Ubiq(){-uitous-} import AnnCoreSyn import CoreSyn import FreeVars import Id ( emptyIdSet, unionIdSets, unionManyIdSets, - elementOfIdSet, IdSet(..) + elementOfIdSet, SYN_IE(IdSet), GenId ) -import Util ( panic ) +import Util ( nOfThem, panic, zipEqual ) \end{code} Top-level interface function, @floatInwards@. Note that we do not @@ -198,7 +198,7 @@ fiExpr to_drop (_, AnnSCC cc expr) \begin{code} fiExpr to_drop (_, AnnCoerce c ty expr) - = _trace "fiExpr:Coerce:wimping out" $ + = --trace "fiExpr:Coerce:wimping out" $ mkCoLets' to_drop (Coerce c ty (fiExpr [] expr)) \end{code} @@ -268,7 +268,7 @@ fiExpr to_drop (_,AnnLet (AnnRec bindings) body) -> [(Id, CoreExpr)] fi_bind to_drops pairs - = [ (binder, fiExpr to_drop rhs) | ((binder, rhs), to_drop) <- zip pairs to_drops ] + = [ (binder, fiExpr to_drop rhs) | ((binder, rhs), to_drop) <- zipEqual "fi_bind" pairs to_drops ] \end{code} For @Case@, the possible ``drop points'' for the \tr{to_drop} @@ -303,13 +303,13 @@ fiExpr to_drop (_, AnnCase scrut alts) fi_alts to_drop_deflt to_drop_alts (AnnAlgAlts alts deflt) = AlgAlts [ (con, params, fiExpr to_drop rhs) - | ((con, params, rhs), to_drop) <- alts `zip` to_drop_alts ] + | ((con, params, rhs), to_drop) <- zipEqual "fi_alts" alts to_drop_alts ] (fi_default to_drop_deflt deflt) fi_alts to_drop_deflt to_drop_alts (AnnPrimAlts alts deflt) = PrimAlts [ (lit, fiExpr to_drop rhs) - | ((lit, rhs), to_drop) <- alts `zip` to_drop_alts ] + | ((lit, rhs), to_drop) <- zipEqual "fi_alts2" alts to_drop_alts ] (fi_default to_drop_deflt deflt) fi_default to_drop AnnNoDefault = NoDefault @@ -354,8 +354,7 @@ sepBindsByDropPoint drop_pts floaters (per_drop_pt, must_stay_here, _) --= sep drop_pts emptyIdSet{-fvs of prev drop_pts-} floaters = split' drop_pts floaters [] empty_boxes - empty_boxes = take (length drop_pts) (repeat []) - + empty_boxes = nOfThem (length drop_pts) [] in (map reverse per_drop_pt, reverse must_stay_here) where