From 74c1f82bd035a57c9df445d803644fb338b32120 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 31 Mar 2010 14:22:29 +0200 Subject: [PATCH] Show number of transformations per function. --- "c\316\273ash/CLasH/Normalize.hs" | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2