seq the unfolding in setUnfoldingInfo
authorIan Lynagh <igloo@earth.li>
Tue, 19 Oct 2010 15:45:52 +0000 (15:45 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 19 Oct 2010 15:45:52 +0000 (15:45 +0000)
Contrary to the comment, for the module in #4367 at least, it is a big
improvement. Without it we get a huge spike of drag.

compiler/basicTypes/IdInfo.lhs

index 0a173d9..c383f89 100644 (file)
@@ -64,7 +64,7 @@ module IdInfo (
         TickBoxOp(..), TickBoxId,
     ) where
 
-import CoreSyn ( CoreRule, setRuleIdName, seqRules, Unfolding, noUnfolding )
+import CoreSyn
 
 import Class
 import PrimOp
@@ -243,9 +243,8 @@ setUnfoldingInfoLazily info uf      -- Lazy variant to avoid looking at the
 
 setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo
 setUnfoldingInfo info uf 
-       -- We do *not* seq on the unfolding info, For some reason, doing so 
-       -- actually increases residency significantly. 
-  = info { unfoldingInfo = uf }
+  = seqUnfolding uf `seq`
+    info { unfoldingInfo = uf }
 
 setArityInfo :: IdInfo -> ArityInfo -> IdInfo
 setArityInfo     info ar  = info { arityInfo = ar  }