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:
a2b8cfa
)
Do not be overzealous with inlining results of polymorphic functions
author
christiaanb
<christiaan.baaij@gmail.com>
Tue, 8 Jun 2010 13:45:14 +0000
(15:45 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Tue, 8 Jun 2010 13:45:14 +0000
(15:45 +0200)
clash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/Normalize.hs
b/clash/CLasH/Normalize.hs
index 4ce4ffa53b4b189b4f7983968f5aac0a18c47ad8..a70829ade05370f51d66c9dbe0575e8e124ef97c 100644
(file)
--- a/
clash/CLasH/Normalize.hs
+++ b/
clash/CLasH/Normalize.hs
@@
-753,7
+753,7
@@
inlinenonrepresult :: Transform
-- that is fully applied (i.e., dos not have a function type) but is not
-- representable. We apply in any context, since non-representable
-- expressions are generally left alone and can occur anywhere.
-- that is fully applied (i.e., dos not have a function type) but is not
-- representable. We apply in any context, since non-representable
-- expressions are generally left alone and can occur anywhere.
-inlinenonrepresult context expr | not (is_
fun
expr) =
+inlinenonrepresult context expr | not (is_
applicable expr) && not (has_free_tyvars
expr) =
case collectArgs expr of
(Var f, args) | not (Id.isDictId f) -> do
repr <- isRepr expr
case collectArgs expr of
(Var f, args) | not (Id.isDictId f) -> do
repr <- isRepr expr
@@
-952,7
+952,7
@@
letmerge c expr = return expr
-- What transforms to run?
transforms = [ ("inlinedict", inlinedict)
, ("inlinetoplevel", inlinetoplevel)
-- What transforms to run?
transforms = [ ("inlinedict", inlinedict)
, ("inlinetoplevel", inlinetoplevel)
-
--
, ("inlinenonrepresult", inlinenonrepresult)
+ , ("inlinenonrepresult", inlinenonrepresult)
, ("knowncase", knowncase)
, ("classopresolution", classopresolution)
, ("argprop", argprop)
, ("knowncase", knowncase)
, ("classopresolution", classopresolution)
, ("argprop", argprop)