X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectCore.hs;h=6be1542134bc28787e477dd09d402154d14a0e86;hb=bee06bad431d372bd862b5c6e921d8fc87eaffc9;hp=db94a7e53685fcf8b50694977aa3ee2647791185;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectCore.hs b/compiler/vectorise/VectCore.hs index db94a7e..6be1542 100644 --- a/compiler/vectorise/VectCore.hs +++ b/compiler/vectorise/VectCore.hs @@ -1,10 +1,3 @@ -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings --- for details - module VectCore ( Vect, VVar, VExpr, VBind, @@ -15,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) @@ -91,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) +