[commit: ghc] wip/T11731: Add a final demand analyzer run right before TidyCore (c762111)
git at git.haskell.org
git at git.haskell.org
Thu Mar 31 11:35:17 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T11731
Link : http://ghc.haskell.org/trac/ghc/changeset/c7621119fe590eb0b7306214be65bc64f5455b6b/ghc
>---------------------------------------------------------------
commit c7621119fe590eb0b7306214be65bc64f5455b6b
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Mar 31 10:18:15 2016 +0200
Add a final demand analyzer run right before TidyCore
in order to have precise used-once information in the exported
strictness signatures, as well as precise used-once information on
thunks. This avoids the bad effects of #11731.
>---------------------------------------------------------------
c7621119fe590eb0b7306214be65bc64f5455b6b
compiler/simplCore/SimplCore.hs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs
index 98bcf2a..689ffbd 100644
--- a/compiler/simplCore/SimplCore.hs
+++ b/compiler/simplCore/SimplCore.hs
@@ -319,6 +319,11 @@ getCoreToDo dflags
[simpl_phase 0 ["post-late-ww"] max_iter]
),
+ -- Final run of the demand_analyser, ensures that one-shot thunks are
+ -- really really one-shot thunks. Only needed if the demand analyser
+ -- has run at all.
+ runWhen (strictness || late_dmd_anal) CoreDoStrictness,
+
maybe_rule_check (Phase 0)
]
More information about the ghc-commits
mailing list