X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectCore.hs;h=cdae4dd9968a17ce6054ede5096828d961402276;hb=791ad7585b4509480592643d0f448b5244122812;hp=6be1542134bc28787e477dd09d402154d14a0e86;hpb=bee06bad431d372bd862b5c6e921d8fc87eaffc9;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectCore.hs b/compiler/vectorise/VectCore.hs index 6be1542..cdae4dd 100644 --- a/compiler/vectorise/VectCore.hs +++ b/compiler/vectorise/VectCore.hs @@ -4,20 +4,18 @@ module VectCore ( vectorised, lifted, mapVect, + vVarType, + vNonRec, vRec, vVar, vType, vNote, vLet, vLams, vLamsWithoutLC, vVarApps, - vCaseDEFAULT, vCaseProd, vInlineMe + vCaseDEFAULT ) where #include "HsVersions.h" import CoreSyn -import CoreUtils ( mkInlineMe ) -import MkCore ( mkWildCase ) -import CoreUtils ( exprType ) -import DataCon ( DataCon ) import Type ( Type ) import Var @@ -38,6 +36,9 @@ mapVect f (x,y) = (f x, f y) zipWithVect :: (a -> b -> c) -> Vect a -> Vect b -> Vect c zipWithVect f (x1,y1) (x2,y2) = (f x1 x2, f y1 y2) +vVarType :: VVar -> Type +vVarType = varType . vectorised + vVar :: VVar -> VExpr vVar = mapVect Var @@ -81,17 +82,3 @@ vCaseDEFAULT (vscrut, lscrut) (vbndr, lbndr) vty lty (vbody, lbody) where mkDEFAULT e = [(DEFAULT, [], e)] -vCaseProd :: VExpr -> Type -> Type - -> DataCon -> DataCon -> [Var] -> [VVar] -> VExpr -> VExpr -vCaseProd (vscrut, lscrut) vty lty vdc ldc sh_bndrs bndrs - (vbody,lbody) - = (mkWildCase vscrut (exprType vscrut) vty - [(DataAlt vdc, vbndrs, vbody)], - mkWildCase lscrut (exprType lscrut) lty - [(DataAlt ldc, sh_bndrs ++ lbndrs, lbody)]) - where - (vbndrs, lbndrs) = unzip bndrs - -vInlineMe :: VExpr -> VExpr -vInlineMe (vexpr, lexpr) = (mkInlineMe vexpr, mkInlineMe lexpr) -