From: Matthijs Kooijman Date: Wed, 19 Aug 2009 08:54:18 +0000 (+0200) Subject: Use isUserDefined for (not) inlining top level functions. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c3fd4c4ef1372598fa715b6e9fc48f1eda57d4ce;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Use isUserDefined for (not) inlining top level functions. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index d66a188..ec7a66b 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -323,7 +323,7 @@ inlinenonreptop = everywhere ("inlinenonrep", inlinebind ((Monad.liftM not) . is inlinetoplevel, inlinetopleveltop :: Transform -- Any system name is candidate for inlining. Never inline user-defined -- functions, to preserver structure. -inlinetoplevel expr@(Var f) | (Name.isSystemName . Id.idName) f = do +inlinetoplevel expr@(Var f) | not $ isUserDefined f = do -- See if this is a top level binding for which we have a body body_maybe <- Trans.lift $ getGlobalBind f case body_maybe of