projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
339dab6
)
Add variant of isNormalizeable that operates in the TranslatorSession.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Fri, 5 Mar 2010 17:14:45 +0000
(18:14 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Fri, 5 Mar 2010 17:14:45 +0000
(18:14 +0100)
cλash/CLasH/Normalize/NormalizeTools.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Normalize/NormalizeTools.hs
b/cλash/CLasH/Normalize/NormalizeTools.hs
index 3da2728176ec42b95e8cbf5a267f2d07658038e9..7a187f859468076873cd5601849793bd2a3bc057 100644
(file)
--- a/
cλash/CLasH/Normalize/NormalizeTools.hs
+++ b/
cλash/CLasH/Normalize/NormalizeTools.hs
@@
-209,9
+209,12
@@
isUserDefined bndr = str `notElem` compiler_names
-- into hardware. Note that if a binder is not normalizable, it might become
-- so using argument propagation.
isNormalizeable :: CoreBndr -> TransformMonad Bool
-- into hardware. Note that if a binder is not normalizable, it might become
-- so using argument propagation.
isNormalizeable :: CoreBndr -> TransformMonad Bool
-isNormalizeable bndr = do
+isNormalizeable bndr = Trans.lift (isNormalizeable' bndr)
+
+isNormalizeable' :: CoreBndr -> TranslatorSession Bool
+isNormalizeable' bndr = do
let ty = Id.idType bndr
let (arg_tys, res_ty) = Type.splitFunTys ty
-- This function is normalizable if all its arguments and return value are
-- representable.
let ty = Id.idType bndr
let (arg_tys, res_ty) = Type.splitFunTys ty
-- This function is normalizable if all its arguments and return value are
-- representable.
- andM $ mapM isRepr (res_ty:arg_tys)
+ andM $ mapM isRepr
'
(res_ty:arg_tys)