[commit: ghc] master: Partially fix #367 by adding HpLim checks to entry with -fno-omit-yields. (d3128bf)

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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d3128bfc286002862e916296629a22f1ce987e4e

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

commit d3128bfc286002862e916296629a22f1ce987e4e
Author: Edward Z. Yang <[email protected]>
Date:   Mon Sep 17 18:28:49 2012 +0200

    Partially fix #367 by adding HpLim checks to entry with -fno-omit-yields.
    
    The current fix is relatively dumb as far as where to add HpLim
    checks: it will always perform a check unless we know that we're
    returning from a closure or we are doing a non let-no-escape case
    analysis.  The performance impact on the nofib suite looks like this:
    
                Min          +5.7%     -0.0%     -6.5%     -6.4%    -50.0%
                Max          +6.3%     +5.8%     +5.0%     +5.5%     +0.8%
     Geometric Mean          +6.2%     +0.1%     +0.5%     +0.5%     -0.8%
    
    Overall, the executable bloat is the biggest problem, so we keep the old
    omit-yields optimization on by default. Remember that if you need an
    interruptibility guarantee, you need to recompile all of your libraries
    with -fno-omit-yields.
    
    A better fix would involve only inserting the yields necessary to break
    loops; this is left as future work.
    
    Signed-off-by: Edward Z. Yang <[email protected]>

 compiler/codeGen/StgCmmExpr.hs |    4 +--
 compiler/codeGen/StgCmmHeap.hs |   57 ++++++++++++++++++++++++++--------------
 compiler/main/DynFlags.hs      |    4 +++
 docs/users_guide/using.xml     |   18 ++++++++++++
 4 files changed, 60 insertions(+), 23 deletions(-)


Diff suppressed because of size. To see it, use:

    git show d3128bfc286002862e916296629a22f1ce987e4e
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.