From 9a75989431be8c2188283c9dff0c105dabb84420 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 31 Mar 2010 11:35:05 +0200 Subject: [PATCH] Only inline top level functions that are completely applied. Partial function applications will be inlined in their entirety to make them fully applied first. --- "c\316\273ash/CLasH/Normalize.hs" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2