X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fvectorise%2FVectUtils.hs;h=c7336efbc58514c01999e79115a88dc308a621a7;hp=8cb0a11a99251000380db7234b1c11e97f97c9c2;hb=724425265ded8958a719b3a62f43006674b506c8;hpb=151b1170c26a325cc93b2ae151804d5a714021a3 diff --git a/compiler/vectorise/VectUtils.hs b/compiler/vectorise/VectUtils.hs index 8cb0a11..c7336ef 100644 --- a/compiler/vectorise/VectUtils.hs +++ b/compiler/vectorise/VectUtils.hs @@ -5,7 +5,7 @@ module VectUtils ( splitClosureTy, TyConRepr(..), mkTyConRepr, - mkToPRepr, mkToArrPRepr, mkFromPRepr, mkFromArrPRepr, + mkToArrPRepr, mkFromPRepr, mkFromArrPRepr, mkPADictType, mkPArrayType, mkPReprType, parrayCoerce, parrayReprTyCon, parrayReprDataCon, mkVScrut, @@ -165,31 +165,6 @@ mkTyConRepr vect_tc mk_tc_app_maybe Nothing [ty] = ty mk_tc_app_maybe (Just tc) tys = mkTyConApp tc tys -mkToPRepr :: TyConRepr -> [[CoreExpr]] -> [CoreExpr] -mkToPRepr (TyConRepr { - repr_tys = repr_tys - , repr_prod_tycons = prod_tycons - , repr_prod_tys = prod_tys - , repr_sum_tycon = repr_sum_tycon - }) - = mk_sum . zipWith3 mk_prod prod_tycons repr_tys - where - Just sum_tycon = repr_sum_tycon - - mk_sum [] = [Var unitDataConId] - mk_sum [expr] = [expr] - mk_sum exprs = zipWith (mk_alt prod_tys) (tyConDataCons sum_tycon) exprs - - mk_alt tys dc expr = mk_con_app dc tys [expr] - - mk_prod _ _ [] = Var unitDataConId - mk_prod _ _ [expr] = expr - mk_prod (Just tc) tys exprs = mk_con_app dc tys exprs - where - [dc] = tyConDataCons tc - - mk_con_app dc tys exprs = mkConApp dc (map Type tys ++ exprs) - mkToArrPRepr :: CoreExpr -> CoreExpr -> [[CoreExpr]] -> VM CoreExpr mkToArrPRepr len sel ess = do