[GHC] #3198: inliner fails to kick in for Double (*)

GHC trac at galois.com
Tue May 12 07:43:10 EDT 2009


#3198: inliner fails to kick in for Double (*)
---------------------------------+------------------------------------------
    Reporter:  JulesBean         |        Owner:                  
        Type:  bug               |       Status:  closed          
    Priority:  normal            |    Milestone:                  
   Component:  Compiler          |      Version:  6.11            
    Severity:  normal            |   Resolution:  fixed           
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Actually in the HEAD the inlining is kicking in:
 {{{
 Print.a =
   \ (f_af9 :: GHC.Types.Double)
     (g_afb :: GHC.Types.Double)
     (eta_B1 :: GHC.Prim.State# GHC.Prim.RealWorld) ->
     case GHC.IO.a23
            GHC.Handle.stdout
            (case f_af9 of _ { GHC.Types.D# x_aAO ->
             case g_afb of _ { GHC.Types.D# y_aAS ->
             GHC.Float.$w$sshowSignedFloat1
               GHC.Float.$sshowFloat
               GHC.Base.zeroInt
               (GHC.Prim.*## x_aAO y_aAS)
               (GHC.Types.[] @ GHC.Types.Char)
             }
             })
            eta_B1
     of _ { (# new_s_azB, _ #) ->
     GHC.IO.$wa13 GHC.Handle.stdout '\n' new_s_azB
     }
 }}}
 Because the ''context'' of the call to `timesDouble` suggests that doing
 so is a good idea.

 I'm not quite sure why 6.10 does not do so, but it's not a big deal either
 way, so I think I'll close this ticket.

 Keep an eye out when we move to 6.12... there are quite a few changes to
 inlining in the pipeline, so we need vigilant users to tell us if there
 are regressions.

 thanks

 Simon

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


More information about the Glasgow-haskell-bugs mailing list