From: Matthijs Kooijman Date: Mon, 17 Aug 2009 09:36:06 +0000 (+0200) Subject: Disable letmerge. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=60174903a7e142bf05586c24498b7e064a7118ff;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Disable letmerge. When faced with nested recursive and non-recursive lets, letmerge becomes complicated very quickly, so we might need to rewrite it if it's really needed. For now, just disable it to prevent it from breaking things. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index b16eb7a..192ed55 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -267,6 +267,7 @@ letremoveunused expr@(Let (Rec binds) res) = do letremoveunused expr = return expr letremoveunusedtop = everywhere ("letremoveunused", letremoveunused) +{- -------------------------------- -- Identical let binding merging -------------------------------- @@ -297,7 +298,8 @@ letmerge expr@(Let _ _) = do -- Leave all other expressions unchanged letmerge expr = return expr letmergetop = everywhere ("letmerge", letmerge) - +-} + -------------------------------- -- Function inlining -------------------------------- @@ -614,7 +616,7 @@ funextracttop = everywhere ("funextract", funextract) -- What transforms to run? -transforms = [argproptop, funextracttop, etatop, betatop, castproptop, letremovesimpletop, letderectop, letremovetop, letsimpltop, letflattop, scrutsimpltop, casesimpltop, caseremovetop, inlinenonreptop, appsimpltop, letmergetop, letremoveunusedtop, castsimpltop, lambdasimpltop] +transforms = [argproptop, funextracttop, etatop, betatop, castproptop, letremovesimpletop, letderectop, letremovetop, letsimpltop, letflattop, scrutsimpltop, casesimpltop, caseremovetop, inlinenonreptop, appsimpltop, letremoveunusedtop, castsimpltop, lambdasimpltop] -- | Returns the normalized version of the given function. getNormalized ::