From 18fd422156a76abe065036b28a672f5e6077bde4 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 6 Apr 2010 19:44:57 +0200 Subject: [PATCH] Make top level inlining handle non-representable results gracefully. Since it does not know (nor care) if the function result is representable, it now uses splitNormalizedNonRep and checks if the result is a Var afterwards. --- "c\316\273ash/CLasH/Normalize.hs" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 8e6926a..620482f 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -358,10 +358,10 @@ needsInline f = do case norm_maybe of -- Noth normalizeable Nothing -> return Nothing - Just norm -> case splitNormalized norm of + Just norm -> case splitNormalizedNonRep norm of -- The function has just a single binding, so that's simple -- enough to inline. - (args, [bind], res) -> return $ Just norm + (args, [bind], Var res) -> return $ Just norm -- More complicated function, don't inline _ -> return Nothing -- 2.30.2