From: Matthijs Kooijman Date: Wed, 31 Mar 2010 09:35:05 +0000 (+0200) Subject: Only inline top level functions that are completely applied. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=9a75989431be8c2188283c9dff0c105dabb84420;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Only inline top level functions that are completely applied. Partial function applications will be inlined in their entirety to make them fully applied first. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 89b5a81..cf33b7b 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/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