[commit: ghc] wip/T10613, wip/T11731: Add a final demand analyzer run right before TidyCore (cd459b8)
git at git.haskell.org
git at git.haskell.org
Thu Mar 31 11:22:53 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branches: wip/T10613,wip/T11731
Link : http://ghc.haskell.org/trac/ghc/changeset/cd459b8cf8ae8ec79e3232321cc10ffa3b08be45/ghc
>---------------------------------------------------------------
commit cd459b8cf8ae8ec79e3232321cc10ffa3b08be45
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.
>---------------------------------------------------------------
cd459b8cf8ae8ec79e3232321cc10ffa3b08be45
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