X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectUtils.hs;h=c62c40546b111975232845d97fbc30c45f3f9ae7;hb=3a90968fac18bbf931420afff6ef866614ecdd7f;hp=6207acdc111ccf7e60050f3116b7981ef35b538d;hpb=fb6d198f498d4e325a540f28aaa6e1d1530839c3;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectUtils.hs b/compiler/vectorise/VectUtils.hs index 6207acd..c62c405 100644 --- a/compiler/vectorise/VectUtils.hs +++ b/compiler/vectorise/VectUtils.hs @@ -11,7 +11,7 @@ module VectUtils ( pdataReprTyCon, pdataReprDataCon, mkVScrut, prDictOfType, prDFunOfTyCon, paDictArgType, paDictOfType, paDFunType, - paMethod, wrapPR, replicatePD, emptyPD, packPD, packByTagPD, + paMethod, wrapPR, replicatePD, emptyPD, packByTagPD, combinePD, liftPD, zipScalars, scalarClosure, @@ -38,7 +38,7 @@ import Var import MkId ( unwrapFamInstScrut ) import Id ( setIdUnfolding ) import TysWiredIn -import BasicTypes ( Boxity(..) ) +import BasicTypes ( Boxity(..), Arity ) import Literal ( Literal, mkMachInt ) import Outputable @@ -267,10 +267,6 @@ replicatePD len x = liftM (`mkApps` [len,x]) emptyPD :: Type -> VM CoreExpr emptyPD = paMethod emptyPDVar "emptyPD" -packPD :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> VM CoreExpr -packPD ty xs len sel = liftM (`mkApps` [xs, len, sel]) - (paMethod packPDVar "packPD" ty) - packByTagPD :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr -> VM CoreExpr packByTagPD ty xs len tags t @@ -352,7 +348,7 @@ polyVApply expr tys return $ mapVect (\e -> e `mkTyApps` tys `mkApps` dicts) expr -data Inline = Inline Int -- arity +data Inline = Inline Arity | DontInline addInlineArity :: Inline -> Int -> Inline @@ -375,7 +371,7 @@ hoistExpr fs expr inl where mk_inline var = case inl of Inline arity -> var `setIdUnfolding` - mkInlineRule InlSat expr arity + mkInlineRule expr (Just arity) DontInline -> var hoistVExpr :: VExpr -> Inline -> VM VVar