[commit: ghc] wip/cpr-vs-jp: Allow CPR for sum types (d531c8d)

git at git.haskell.org git at git.haskell.org
Tue Jan 7 14:49:01 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/cpr-vs-jp
Link       : http://ghc.haskell.org/trac/ghc/changeset/d531c8dc559a4fe780a84eb4fca45b53f7c91418/ghc

>---------------------------------------------------------------

commit d531c8dc559a4fe780a84eb4fca45b53f7c91418
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Jan 7 09:53:21 2014 +0000

    Allow CPR for sum types
    
    as the join point problem is taken care of.


>---------------------------------------------------------------

d531c8dc559a4fe780a84eb4fca45b53f7c91418
 compiler/stranal/DmdAnal.lhs |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs
index 8a6e9ee..914866c 100644
--- a/compiler/stranal/DmdAnal.lhs
+++ b/compiler/stranal/DmdAnal.lhs
@@ -639,9 +639,9 @@ dmdAnalRhs top_lvl rec_flag env id rhs
 
     (lazy_fv, sig_fv) = splitFVs is_thunk rhs_fv1
 
-    rhs_res'  = trimCPRInfo trim_all trim_sums rhs_res
+    rhs_res'  = trimCPRInfo trim_all False rhs_res
     trim_all  = is_thunk && not_strict
-    trim_sums = not (isTopLevel top_lvl) -- See Note [CPR for sum types]
+    -- trim_sums = not (isTopLevel top_lvl) -- See Note [CPR for sum types]
 
     -- See Note [CPR for thunks]
     is_thunk = not (exprIsHNF rhs)



More information about the ghc-commits mailing list