projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0223b46
)
Show number of transformations per function.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 12:22:29 +0000
(14:22 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 31 Mar 2010 12:22:29 +0000
(14:22 +0200)
cλash/CLasH/Normalize.hs
patch
|
blob
|
history
diff --git
a/cλash/CLasH/Normalize.hs
b/cλash/CLasH/Normalize.hs
index 180ac3191868a836cacab096fbed1258cb39a4ae..2b5c8999147c03662ff5bf806cab27af9e992ff3 100644
(file)
--- a/
cλash/CLasH/Normalize.hs
+++ b/
cλash/CLasH/Normalize.hs
@@
-850,11
+850,14
@@
normalizeExpr ::
-> TranslatorSession CoreSyn.CoreExpr -- ^ The normalized expression
normalizeExpr what expr = do
-> 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
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 ("\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
return expr'
-- | Split a normalized expression into the argument binders, top level