X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectCore.hs;h=6be1542134bc28787e477dd09d402154d14a0e86;hb=432b9c9322181a3644083e3c19b7e240d90659e7;hp=de832793f654e3243486ded9dab5f79ff7ac247e;hpb=30c122df62ec75f9ed7f392f24c2925675bf1d06;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectCore.hs b/compiler/vectorise/VectCore.hs index de83279..6be1542 100644 --- a/compiler/vectorise/VectCore.hs +++ b/compiler/vectorise/VectCore.hs @@ -8,16 +8,17 @@ module VectCore ( vVar, vType, vNote, vLet, vLams, vLamsWithoutLC, vVarApps, - vCaseDEFAULT, vCaseProd + vCaseDEFAULT, vCaseProd, vInlineMe ) where #include "HsVersions.h" import CoreSyn +import CoreUtils ( mkInlineMe ) +import MkCore ( mkWildCase ) import CoreUtils ( exprType ) import DataCon ( DataCon ) import Type ( Type ) -import Id ( mkWildId ) import Var type Vect a = (a,a) @@ -84,9 +85,13 @@ vCaseProd :: VExpr -> Type -> Type -> DataCon -> DataCon -> [Var] -> [VVar] -> VExpr -> VExpr vCaseProd (vscrut, lscrut) vty lty vdc ldc sh_bndrs bndrs (vbody,lbody) - = (Case vscrut (mkWildId $ exprType vscrut) vty + = (mkWildCase vscrut (exprType vscrut) vty [(DataAlt vdc, vbndrs, vbody)], - Case lscrut (mkWildId $ exprType lscrut) lty + 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) +