#5448: GHC stuck in infinite loop compiling with optimizations
---------------------------------+------------------------------------------
  Reporter:  ronwalf             |          Owner:                
      Type:  bug                 |         Status:  new           
  Priority:  normal              |      Milestone:                
 Component:  Compiler            |        Version:  7.0.3         
Resolution:                      |       Keywords:                
  Testcase:                      |      Blockedby:                
Difficulty:                      |             Os:  MacOS X       
  Blocking:                      |   Architecture:  x86_64 (amd64)
   Failure:  Compile-time crash  |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit 24a2353a77111e9f236325521edd233f35954328
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Fri Sep 23 06:46:30 2011 +0100

     Add a transformation limit to the simplifier (Trac #5448)

     This addresses the rare cases where the simplifier diverges
     (see the above ticket).  We were already counting how many simplifier
     steps were taking place, but with no limit.  This patch adds a limit;
     at which point we halt compilation, and print out useful stats. The
     stats show what is begin inlined, and how often, which points you
     directly to the problem.  The limit is set based on the size of the
     program.

     Instead of halting compilation, we could instead just inhibit
     inlining, which would let compilation of the module complete. This is
     a bit harder to implement, and it's likely to mean that you unrolled
     the function 1143 times and then ran out of ticks; you probably don't
     want to complete parsing on this highly-unrolled program.

     Flags: -dsimpl-tick-factor=N.  Default is 100 (percent).
            A bigger number increases the allowed maximum tick count.

  compiler/main/DynFlags.hs         |    3 +
  compiler/simplCore/CoreMonad.lhs  |   44 +++--
  compiler/simplCore/SimplCore.lhs  |   10 +-
  compiler/simplCore/SimplMonad.lhs |  341
 ++++++++++++++++++++-----------------
  compiler/simplCore/Simplify.lhs   |    4 +-
  5 files changed, 223 insertions(+), 179 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5448#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to