projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add sliceP mapping to vectoriser builtins
[ghc-hetmet.git]
/
compiler
/
vectorise
/
VectUtils.hs
diff --git
a/compiler/vectorise/VectUtils.hs
b/compiler/vectorise/VectUtils.hs
index
9faa0ed
..
c62c405
100644
(file)
--- a/
compiler/vectorise/VectUtils.hs
+++ b/
compiler/vectorise/VectUtils.hs
@@
-11,7
+11,7
@@
module VectUtils (
pdataReprTyCon, pdataReprDataCon, mkVScrut,
prDictOfType, prDFunOfTyCon,
paDictArgType, paDictOfType, paDFunType,
pdataReprTyCon, pdataReprDataCon, mkVScrut,
prDictOfType, prDFunOfTyCon,
paDictArgType, paDictOfType, paDFunType,
- paMethod, wrapPR, replicatePD, emptyPD, packPD, packByTagPD,
+ paMethod, wrapPR, replicatePD, emptyPD, packByTagPD,
combinePD,
liftPD,
zipScalars, scalarClosure,
combinePD,
liftPD,
zipScalars, scalarClosure,
@@
-25,7
+25,7
@@
module VectUtils (
import VectCore
import VectMonad
import VectCore
import VectMonad
-import MkCore ( mkCoreTup, mkCoreTupTy, mkWildCase )
+import MkCore ( mkCoreTup, mkWildCase )
import CoreSyn
import CoreUtils
import CoreUnfold ( mkInlineRule )
import CoreSyn
import CoreUtils
import CoreUnfold ( mkInlineRule )
@@
-38,7
+38,7
@@
import Var
import MkId ( unwrapFamInstScrut )
import Id ( setIdUnfolding )
import TysWiredIn
import MkId ( unwrapFamInstScrut )
import Id ( setIdUnfolding )
import TysWiredIn
-import BasicTypes ( Boxity(..) )
+import BasicTypes ( Boxity(..), Arity )
import Literal ( Literal, mkMachInt )
import Outputable
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"
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
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
return $ mapVect (\e -> e `mkTyApps` tys `mkApps` dicts) expr
-data Inline = Inline Int -- arity
+data Inline = Inline Arity
| DontInline
addInlineArity :: Inline -> Int -> Inline
| DontInline
addInlineArity :: Inline -> Int -> Inline
@@
-375,7
+371,7
@@
hoistExpr fs expr inl
where
mk_inline var = case inl of
Inline arity -> var `setIdUnfolding`
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
DontInline -> var
hoistVExpr :: VExpr -> Inline -> VM VVar
@@
-514,5
+510,5
@@
buildEnv vs
where
(vvs, lvs) = unzip vs
tys = map vVarType vs
where
(vvs, lvs) = unzip vs
tys = map vVarType vs
- ty = mkCoreTupTy tys
+ ty = mkBoxedTupleTy tys