[GHC] #4081: Strict constructor fields inspected in loop

GHC cvs-ghc at haskell.org
Tue Feb 15 13:31:04 CET 2011


#4081: Strict constructor fields inspected in loop
---------------------------------+------------------------------------------
    Reporter:  rl                |        Owner:                         
        Type:  bug               |       Status:  new                    
    Priority:  normal            |    Milestone:  7.0.2                  
   Component:  Compiler          |      Version:  6.13                   
    Keywords:                    |     Testcase:                         
   Blockedby:                    |   Difficulty:                         
          Os:  Unknown/Multiple  |     Blocking:                         
Architecture:  Unknown/Multiple  |      Failure:  Runtime performance bug
---------------------------------+------------------------------------------

Comment(by simonpj):

 I'm pretty certain we can fix this.  My plan is simply to extend the let-
 floater to float out `(case x of I# y ->  ...)`, where x is known to be
 evaluated.  (Of course, for any product type, not just Int.)

 How might x be known to be evaluated? The usual way is by an enclosing
 'case', but that won't happen here because the inner case would simply
 vanish. No, it'll be because you pattern match on a strict constructor
 {{{
   case v of
     C x -> ....(case x of I# y -> ...) ...
 }}}
 where
 {{{
   data C a = C !a
 }}}
 I believe that these strict constructors are the cases you are concerned
 about, correct?

 Simon

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



More information about the Glasgow-haskell-bugs mailing list