projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generate lots of __inline_me during vectorisation
[ghc-hetmet.git]
/
compiler
/
vectorise
/
VectCore.hs
diff --git
a/compiler/vectorise/VectCore.hs
b/compiler/vectorise/VectCore.hs
index
34ffdb7
..
6be1542
100644
(file)
--- a/
compiler/vectorise/VectCore.hs
+++ b/
compiler/vectorise/VectCore.hs
@@
-8,18
+8,17
@@
module VectCore (
vVar, vType, vNote, vLet,
vLams, vLamsWithoutLC, vVarApps,
vVar, vType, vNote, vLet,
vLams, vLamsWithoutLC, vVarApps,
- vCaseDEFAULT, vCaseProd
+ vCaseDEFAULT, vCaseProd, vInlineMe
) where
) where
--- XXX This define is a bit of a hack, and should be done more nicely
-#define FAST_STRING_NOT_NEEDED 1
#include "HsVersions.h"
import CoreSyn
#include "HsVersions.h"
import CoreSyn
+import CoreUtils ( mkInlineMe )
+import MkCore ( mkWildCase )
import CoreUtils ( exprType )
import DataCon ( DataCon )
import Type ( Type )
import CoreUtils ( exprType )
import DataCon ( DataCon )
import Type ( Type )
-import Id ( mkWildId )
import Var
type Vect a = (a,a)
import Var
type Vect a = (a,a)
@@
-86,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)
-> 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)],
[(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
[(DataAlt ldc, sh_bndrs ++ lbndrs, lbody)])
where
(vbndrs, lbndrs) = unzip bndrs
+
+vInlineMe :: VExpr -> VExpr
+vInlineMe (vexpr, lexpr) = (mkInlineMe vexpr, mkInlineMe lexpr)
+