projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add -fdph-this
[ghc-hetmet.git]
/
compiler
/
vectorise
/
Vectorise.hs
diff --git
a/compiler/vectorise/Vectorise.hs
b/compiler/vectorise/Vectorise.hs
index
1c8e19c
..
8d8bfef
100644
(file)
--- a/
compiler/vectorise/Vectorise.hs
+++ b/
compiler/vectorise/Vectorise.hs
@@
-53,6
+53,7
@@
vectorise backend hsc_env _ _ guts
backendPackage DPHSeq = dphSeqPackageId
backendPackage DPHPar = dphParPackageId
backendPackage DPHSeq = dphSeqPackageId
backendPackage DPHPar = dphParPackageId
+ backendPackage DPHThis = thisPackage dflags
vectModule :: ModGuts -> VM ModGuts
vectModule guts
vectModule :: ModGuts -> VM ModGuts
vectModule guts
@@
-275,7
+276,7
@@
vectExpr e@(fvs, AnnLam bndr _)
where
(bs,body) = collectAnnValBinders e
where
(bs,body) = collectAnnValBinders e
-vectExpr e = traceNoV "vectExpr: can't vectorise" (ppr $ deAnnotate e)
+vectExpr e = cantVectorise "Can't vectorise expression" (ppr $ deAnnotate e)
vectLam :: VarSet -> [Var] -> CoreExprWithFVs -> VM VExpr
vectLam fvs bs body
vectLam :: VarSet -> [Var] -> CoreExprWithFVs -> VM VExpr
vectLam fvs bs body
@@
-298,7
+299,8
@@
vectLam fvs bs body
vectTyAppExpr :: CoreExprWithFVs -> [Type] -> VM VExpr
vectTyAppExpr (_, AnnVar v) tys = vectPolyVar v tys
vectTyAppExpr :: CoreExprWithFVs -> [Type] -> VM VExpr
vectTyAppExpr (_, AnnVar v) tys = vectPolyVar v tys
-vectTyAppExpr e _ = traceNoV "vectTyAppExpr: can't vectorise" (ppr $ deAnnotate e)
+vectTyAppExpr e tys = cantVectorise "Can't vectorise expression"
+ (ppr $ deAnnotate e `mkTyApps` tys)
-- We convert
--
-- We convert
--
@@
-370,11
+372,13
@@
vectAlgCase tycon _ty_args scrut bndr ty alts
let (vect_scrut, lift_scrut) = vscrut
(vect_bodies, lift_bodies) = unzip vbodies
let (vect_scrut, lift_scrut) = vscrut
(vect_bodies, lift_bodies) = unzip vbodies
- let vect_case = Case vect_scrut (mkWildId (exprType vect_scrut)) vty
+ vdummy <- newDummyVar (exprType vect_scrut)
+ ldummy <- newDummyVar (exprType lift_scrut)
+ let vect_case = Case vect_scrut vdummy vty
(zipWith3 mk_vect_alt vect_dcs vect_bndrss vect_bodies)
lbody <- combinePA vty len sel indices lift_bodies
(zipWith3 mk_vect_alt vect_dcs vect_bndrss vect_bodies)
lbody <- combinePA vty len sel indices lift_bodies
- let lift_case = Case lift_scrut (mkWildId (exprType lift_scrut)) lty
+ let lift_case = Case lift_scrut ldummy lty
[(DataAlt arr_dc, shape_bndrs ++ concat lift_bndrss,
lbody)]
[(DataAlt arr_dc, shape_bndrs ++ concat lift_bndrss,
lbody)]