projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When inlining top level functions, guarantee uniqueness.
[matthijs/master-project/cλash.git]
/
cλash
/
CLasH
/
Normalize.hs
diff --git
a/cλash/CLasH/Normalize.hs
b/cλash/CLasH/Normalize.hs
index cce31864c5f2f0878719c6f42cc4b1d0174d7656..1f0509da5a2ee674aae1117c9150615794152638 100644
(file)
--- a/
cλash/CLasH/Normalize.hs
+++ b/
cλash/CLasH/Normalize.hs
@@
-332,8
+332,10
@@
inlinetoplevel expr@(Var f) | not $ isUserDefined f = do
-- Get the normalized version
norm <- Trans.lift $ getNormalized f
if needsInline norm
-- Get the normalized version
norm <- Trans.lift $ getNormalized f
if needsInline norm
- then
- change norm
+ then do
+ -- Regenerate all uniques in the to-be-inlined expression
+ norm_uniqued <- Trans.lift $ genUniques norm
+ change norm_uniqued
else
return expr
else
else
return expr
else