[commit: ghc] supercompiler: Start paying attention to loop-breaker-ness again (a7cf8d9)

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/a7cf8d9d8d9ac5e4f7003665a9c051d1dcd49914

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

commit a7cf8d9d8d9ac5e4f7003665a9c051d1dcd49914
Author: Max Bolingbroke <[email protected]>
Date:   Wed Mar 28 12:05:10 2012 +0100

    Start paying attention to loop-breaker-ness again

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

 .../Supercompile/Evaluator/Evaluate.hs             |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
index b1dab5f..85ad931 100644
--- a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
+++ b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
@@ -101,7 +101,10 @@ summariseContext h k = trainCarFoldr go (True, [], BoringCtxt) k
 ghcHeuristics :: Id -> AnnedTerm {- try not to pull on this, it does a lot of work -}
               -> ContextSummary -> Bool
 ghcHeuristics x e (lone_variable, arg_infos, cont_info)
-  = (try (idUnfolding x) `mplus` try answer_unf) `orElse` trce (text "No unfolding") False
+  | isStrongLoopBreaker (idOccInfo x)
+  = False -- NB: have to check this (not just use idUnfolding) because we might consider "e"
+  | otherwise
+  = (try (realIdUnfolding x) `mplus` try answer_unf) `orElse` trce (text "No unfolding") False
   where
     try unf = case unf of
       CoreSyn.CoreUnfolding { CoreSyn.uf_is_top = is_top, CoreSyn.uf_is_work_free = is_work_free, CoreSyn.uf_expandable = expandable
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.