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:
330fbf1
)
Only inline top level functions that are completely applied.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 09:35:05 +0000
(11:35 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 09:35:05 +0000
(11:35 +0200)
Partial function applications will be inlined in their entirety to make
them fully applied first.
cλash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Normalize.hs
b/cλash/CLasH/Normalize.hs
index 89b5a8118691d99d9eb63077be7f761734478146..cf33b7bb3d9aab751eb071db017975c35e7bb04d 100644
(file)
--- a/
cλash/CLasH/Normalize.hs
+++ b/
cλash/CLasH/Normalize.hs
@@
-353,7
+353,7
@@
inlinenonreptop = everywhere ("inlinenonrep", inlinebind ((Monad.liftM not) . is
-- By not inlining any other reference, we also prevent looping problems
-- with funextract and inlinedict.
inlinetoplevel, inlinetopleveltop :: Transform
-inlinetoplevel (LetBinding:_) expr =
+inlinetoplevel (LetBinding:_) expr
| not (is_fun expr)
=
case collectArgs expr of
(Var f, args) -> do
body_maybe <- needsInline f