[commit: ghc] supercompiler: Put case-alt refinement under flag control since it may be causing even more divergence in Main5 (16d25e3)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/16d25e3ed92fdfe2ee4f7cb64825738cad9eb808

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

commit 16d25e3ed92fdfe2ee4f7cb64825738cad9eb808
Author: Max Bolingbroke <[email protected]>
Date:   Mon Jan 16 16:23:40 2012 +0000

    Put case-alt refinement under flag control since it may be causing even more divergence in Main5

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

 compiler/supercompile/Supercompile/Drive/Split.hs |    4 ++--
 compiler/supercompile/Supercompile/StaticFlags.hs |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Split.hs b/compiler/supercompile/Supercompile/Drive/Split.hs
index cc9dee0..73cb876 100644
--- a/compiler/supercompile/Supercompile/Drive/Split.hs
+++ b/compiler/supercompile/Supercompile/Drive/Split.hs
@@ -1090,8 +1090,8 @@ splitStackFrame ctxt_ids ids kf scruts bracketed_hole
             --   1. Filter out any branches of the case which we know are impossible due to type refinement
             --   2. Turn any remaining default cases into explicit constructors if possible (helps positive information propagation)
             alts = [ (coreAltConToAltCon altcon xs, e)
-                   | (altcon, xs, e) <- thirdOf3 (filterAlts (repeat wildCardKey) (idType x') []
-                                                             [(altcon', xs, e) | (altcon, e) <- unfiltered_alts, let (altcon', xs) = altConToCoreAltCon altcon])
+                   | (altcon, xs, e) <- (if rEFINE_ALTS then thirdOf3 . filterAlts (repeat wildCardKey) (idType x') [] else id)
+                                            [(altcon', xs, e) | (altcon, e) <- unfiltered_alts, let (altcon', xs) = altConToCoreAltCon altcon]
                    ]
 
             (alt_cons, alt_es) = unzip alts
diff --git a/compiler/supercompile/Supercompile/StaticFlags.hs b/compiler/supercompile/Supercompile/StaticFlags.hs
index 282b758..d436137 100644
--- a/compiler/supercompile/Supercompile/StaticFlags.hs
+++ b/compiler/supercompile/Supercompile/StaticFlags.hs
@@ -25,6 +25,10 @@ eAGER_SPLIT_VALUES :: Bool
 eAGER_SPLIT_VALUES = iNSTANCE_MATCHING -- For correctness given that we do instance matching
 --eAGER_SPLIT_VALUES = False
 
+rEFINE_ALTS :: Bool
+--rEFINE_ALTS = True
+rEFINE_ALTS = False
+
 dEEDS :: Bool
 dEEDS = "--deeds" `elem` aRGS
 --dEEDS = True
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.