[GHC] #5928: INLINABLE fails to specialize in presence of simple wrapper

GHC cvs-ghc at haskell.org
Sun Mar 11 18:52:58 CET 2012


#5928: INLINABLE fails to specialize in presence of simple wrapper
------------------------------+---------------------------------------------
 Reporter:  tibbe             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------

Comment(by tibbe):

 This
 [https://github.com/haskell/containers/commit/3f798e333509f02eb44d39a41068c76863064097
 commit to the containers library] by Milan Straka seems relevant.

 Relevant part of commit message:

 {{{
 * In GHC, INLINing the INLINABLE method as in
     update f = updateWithKey (\_ x -> f x)
     {-# INLINE update #-}
     updateWithKey = ...
     {-# INLINABLE updateWithKey #-}
   does not produce wanted result -- the updateWithKey does not get
   specialized in the call-site module.

   The solution is to mark both functions INLINABLE.
 }}}

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



More information about the Glasgow-haskell-bugs mailing list