From: Matthijs Kooijman Date: Wed, 31 Mar 2010 12:22:29 +0000 (+0200) Subject: Show number of transformations per function. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=74c1f82bd035a57c9df445d803644fb338b32120 Show number of transformations per function. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 180ac31..2b5c899 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -850,11 +850,14 @@ normalizeExpr :: -> TranslatorSession CoreSyn.CoreExpr -- ^ The normalized expression normalizeExpr what expr = do + startcount <- MonadState.get tsTransformCounter expr_uniqued <- genUniques expr -- Normalize this expression trace (what ++ " before normalization:\n\n" ++ showSDoc ( ppr expr_uniqued ) ++ "\n") $ return () expr' <- dotransforms transforms expr_uniqued + endcount <- MonadState.get tsTransformCounter trace ("\n" ++ what ++ " after normalization:\n\n" ++ showSDoc ( ppr expr')) $ return () + trace ("\nNeeded " ++ show (endcount - startcount) ++ " transformations to normalize " ++ what) $ return () return expr' -- | Split a normalized expression into the argument binders, top level