[GHC] #7283: Specialise INLINE functions

GHC cvs-ghc at haskell.org
Tue Oct 2 10:30:55 CEST 2012


#7283: Specialise INLINE functions
---------------------------------+------------------------------------------
    Reporter:  rl                |       Owner:                         
        Type:  feature request   |      Status:  new                    
    Priority:  normal            |   Milestone:                         
   Component:  Compiler          |     Version:  7.7                    
    Keywords:                    |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple  |     Failure:  Runtime performance bug
  Difficulty:  Unknown           |    Testcase:                         
   Blockedby:                    |    Blocking:                         
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by rl):

 I'll try to rephrase the last paragraph. The problem is that this change
 will make GHC inline more since it will now be able (but not keen) to
 inline INLINE functions even if they aren't applied to enough arguments.
 The original reason for making INLINE respect arity was code bloat so we
 should be careful not to reintroduce this problem with this change.
 However, if INLINE functions that are not applied to enough arguments are
 treated exactly as INLINABLE then GHC won't try extra hard to inline them
 so perhaps we will be ok. This is different to what we had before the
 arity restriction on INLINE - back then, GHC would try extra hard to
 inline regardless of the number of arguments. So while we will inline more
 under my proposal, it will (hopefully) still be substantially less than in
 the bad old days.

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



More information about the Glasgow-haskell-bugs mailing list