#4874: Unnecessary reboxing when using INLINABLE
---------------------------------+------------------------------------------
    Reporter:  tibbe             |        Owner:  simonpj     
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  7.0.3       
   Component:  Compiler          |      Version:  7.0.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonpj):

 I've had a quick look at your new example.  What's happening is that
  * `$ssearch` is marked INLINEABLE, so we capture its RHS (which is big).
  * Because this big thing is the inlining of `$ssearch`, it isn't inlined
 (too big)

 This happens because a variable (at the moment) only has one inlining.

 You marked `search` as INLINEABLE because you wanted to be able to
 specialise it.  But having specialised it, you really want the resulting
 thing (`$ssearch` in this case) to behave as an ordinary function.
 Curreintly it is "inheriting" the INLINEABLE pragma from its parent
 `search`.

 Maybe I should just disable that inheritance.  I'll try that.  But not
 tonight.

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