#5327: INLINABLE pragma and newtypes prevents inlining
---------------------------------+------------------------------------------
    Reporter:  reinerp           |        Owner:                         
        Type:  bug               |       Status:  new                    
    Priority:  normal            |    Milestone:  7.4.1                  
   Component:  Compiler          |      Version:  7.1                    
    Keywords:                    |     Testcase:                         
   Blockedby:                    |   Difficulty:                         
          Os:  Unknown/Multiple  |     Blocking:                         
Architecture:  Unknown/Multiple  |      Failure:  Runtime performance bug
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit 29edeadbc7d974232f67cdc4fd05283b35721ae0
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon Jul 25 09:33:09 2011 +0100

     Re-engineer exprIsConApp_maybe (fixes Trac #5327)

     The problem with #5327 was like this:
         let x = I# 0 `cast` co1
         in ...(case x `cast` co2 of I# y -> blah)...

     The two casts cancelled out, but exprIsConApp_maybe couldn't see
     that.  This patch makes it simpler, faster, and more effective.

     (Incidentally, usually 'x' would be inlined, in #5327 it wasn't
     because of an INLINEABLE pragma and the lone-variable thing.
     Instead of fiddling with alrady-delicate code, I just made
     exprIsConApp_maybe better.)

  compiler/coreSyn/CoreUnfold.lhs |  153
 +++++++++++++++++++--------------------
  1 files changed, 76 insertions(+), 77 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5327#comment:2>
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