summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2017-04-30 20:21:43 -0400
committerReid Barton <rwbarton@gmail.com>2017-04-30 20:21:43 -0400
commit9ca83a67bb88682f0382323ffb6a7481cf02e703 (patch)
tree5bc7197420daa526d92829dd72817bc6ce7088b5
parent41d9a79078b48b0e308be1fc61b9bd1b616c76c5 (diff)
downloadhaskell-wip/rwbarton-seq-unf.tar.gz
WIP: Force stable unfoldings in megaSeqIdInfowip/rwbarton-seq-unf
-rw-r--r--compiler/coreSyn/CoreSeq.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreSeq.hs b/compiler/coreSyn/CoreSeq.hs
index d426bd3581..bb2ca041f5 100644
--- a/compiler/coreSyn/CoreSeq.hs
+++ b/compiler/coreSyn/CoreSeq.hs
@@ -28,7 +28,7 @@ megaSeqIdInfo info
-- Omitting this improves runtimes a little, presumably because
-- some unfoldings are not calculated at all
--- seqUnfolding (unfoldingInfo info) `seq`
+ seqUnfolding (unfoldingInfo info) `seq`
seqDemand (demandInfo info) `seq`
seqStrictSig (strictnessInfo info) `seq`
@@ -101,7 +101,8 @@ seqUnfolding :: Unfolding -> ()
seqUnfolding (CoreUnfolding { uf_tmpl = e, uf_is_top = top,
uf_is_value = b1, uf_is_work_free = b2,
uf_expandable = b3, uf_is_conlike = b4,
- uf_guidance = g})
+ uf_guidance = g, uf_src = src})
+ | isStableSource src
= seqExpr e `seq` top `seq` b1 `seq` b2 `seq` b3 `seq` b4 `seq` seqGuidance g
seqUnfolding _ = ()