projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f36b5cd
)
More refactoring
author
Roman Leshchinskiy
<rl@cse.unsw.edu.au>
Thu, 2 Aug 2007 02:28:59 +0000
(
02:28
+0000)
committer
Roman Leshchinskiy
<rl@cse.unsw.edu.au>
Thu, 2 Aug 2007 02:28:59 +0000
(
02:28
+0000)
compiler/vectorise/VectUtils.hs
patch
|
blob
|
history
diff --git
a/compiler/vectorise/VectUtils.hs
b/compiler/vectorise/VectUtils.hs
index
0727c94
..
b3c110e
100644
(file)
--- a/
compiler/vectorise/VectUtils.hs
+++ b/
compiler/vectorise/VectUtils.hs
@@
-7,7
+7,7
@@
module VectUtils (
paMethod, lengthPA, replicatePA, emptyPA, liftPA,
polyAbstract, polyApply, polyVApply,
lookupPArrayFamInst,
paMethod, lengthPA, replicatePA, emptyPA, liftPA,
polyAbstract, polyApply, polyVApply,
lookupPArrayFamInst,
- hoistExpr, hoistPolyVExpr, takeHoisted,
+ hoistBinding, hoistExpr, hoistPolyVExpr, takeHoisted,
buildClosure, buildClosures,
mkClosureApp
) where
buildClosure, buildClosures,
mkClosureApp
) where
@@
-215,12
+215,15
@@
polyVApply expr tys
lookupPArrayFamInst :: Type -> VM (TyCon, [Type])
lookupPArrayFamInst ty = builtin parrayTyCon >>= (`lookupFamInst` [ty])
lookupPArrayFamInst :: Type -> VM (TyCon, [Type])
lookupPArrayFamInst ty = builtin parrayTyCon >>= (`lookupFamInst` [ty])
+hoistBinding :: Var -> CoreExpr -> VM ()
+hoistBinding v e = updGEnv $ \env ->
+ env { global_bindings = (v,e) : global_bindings env }
+
hoistExpr :: FastString -> CoreExpr -> VM Var
hoistExpr fs expr
= do
var <- newLocalVar fs (exprType expr)
hoistExpr :: FastString -> CoreExpr -> VM Var
hoistExpr fs expr
= do
var <- newLocalVar fs (exprType expr)
- updGEnv $ \env ->
- env { global_bindings = (var, expr) : global_bindings env }
+ hoistBinding var expr
return var
hoistVExpr :: VExpr -> VM VVar
return var
hoistVExpr :: VExpr -> VM VVar