#2396: Default class method not inlined
---------------------------------+------------------------------------------
    Reporter:  sedillard         |        Owner:                         
        Type:  bug               |       Status:  new                    
    Priority:  low               |    Milestone:  7.0.1                  
   Component:  Compiler          |      Version:  6.8.3                  
    Keywords:                    |     Testcase:                         
   Blockedby:                    |   Difficulty:  Unknown                
          Os:  Unknown/Multiple  |     Blocking:                         
Architecture:  Unknown/Multiple  |      Failure:  Runtime performance bug
---------------------------------+------------------------------------------

Comment(by reinerp):

 With ghc 6.12.3, we get the following core from your file:

 {{{
 Test.$wmultmv3d =
   \ (ww_svV :: Double#)
     (ww1_svW :: Double#)
     (ww2_svX :: Double#)
     (ww3_sw3 :: Double#)
     (ww4_sw4 :: Double#)
     (ww5_sw5 :: Double#)
     (ww6_swb :: Double#)
     (ww7_swc :: Double#)
     (ww8_swd :: Double#)
     (w_swj :: Test.Vec3D) ->
     case w_swj of _ { Test.Vec3D rb_XtF rb1_XtH rb2_XtJ ->
     (# +##
          (*## rb_XtF ww_svV)
          (+##
             (*## rb1_XtH ww1_svW) (*## rb2_XtJ ww2_svX)),
        +##
          (*## rb_XtF ww3_sw3)
          (+##
             (*## rb1_XtH ww4_sw4) (*## rb2_XtJ ww5_sw5)),
        +##
          (*## rb_XtF ww6_swb)
          (+##
             (*## rb1_XtH ww7_swc) (*## rb2_XtJ ww8_swd)) #)
     }
 ...
 Test.multmv3d :: Test.Mat33D -> Test.Vec3D -> Test.Vec3D
 GblId

  Worker Test.$wmultmv3d

 Test.multmv3d =
   __inline_me (\ (w_svR :: Test.Mat33D) (w1_swj :: Test.Vec3D) ->
                  case w_svR of _ { Test.:. ww_svT ww1_svZ ->
                  case ww_svT of _ { Test.Vec3D ww3_svV ww4_svW ww5_svX ->
                  case ww1_svZ of _ { Test.:. ww7_sw1 ww8_sw7 ->
                  case ww7_sw1 of _ { Test.Vec3D ww10_sw3 ww11_sw4 ww12_sw5
 ->
                  case ww8_sw7 of _ { Test.:. ww14_sw9 _ ->
                  case ww14_sw9 of _ { Test.Vec3D ww17_swb ww18_swc
 ww19_swd ->
                  case Test.$wmultmv3d
                         ww3_svV
                         ww4_svW
                         ww5_svX
                         ww10_sw3
                         ww11_sw4
                         ww12_sw5
                         ww17_swb
                         ww18_swc
                         ww19_swd
                         w1_swj
                  of _ { (# ww21_swp, ww22_swq, ww23_swr #) ->
                  Test.Vec3D ww21_swp ww22_swq ww23_swr
                  }
                  }
                  }
                  }
                  }
                  }
                  })

 }}}
 which has no unnecessary constructors.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2396#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to