#5715: Inliner fails to inline a function, causing 20x slowdown
--------------------------------------+-------------------------------------
  Reporter:  bos                      |          Owner:                  
      Type:  bug                      |         Status:  closed          
  Priority:  normal                   |      Milestone:  7.4.2           
 Component:  Compiler                 |        Version:  7.2.1           
Resolution:  invalid                  |       Keywords:                  
        Os:  Unknown/Multiple         |   Architecture:  Unknown/Multiple
   Failure:  Runtime performance bug  |     Difficulty:  Unknown         
  Testcase:                           |      Blockedby:                  
  Blocking:                           |        Related:                  
--------------------------------------+-------------------------------------

Comment(by simonpj@…):

 commit fa9fdc283be5429ec65c625d35daf2d7e65e2227
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Fri Apr 20 17:05:15 2012 +0100

     Do SCC on instance declarations (fixes Trac #5715)

     The trouble here is that given

         {-# LANGUAGE DataKinds, TypeFamilies #-}
         data instance Foo a = Bar (Bar a)

     we want to get a sensible message that we can't use the promoted 'Bar'
     constructor until after its definition; it's a staging error.  Bud the
     staging mechanism that we use for vanilla data declarations don't work
     here.

     Solution is to perform strongly-connected component analysis on the
     instance declarations. But that in turn means that we need to track
     free-variable information on more HsSyn declarations, which is why
     so many files are touched.  All the changes are boiler-platey except
     the ones in TcInstDcls.

  compiler/basicTypes/NameEnv.lhs     |   32 +++++++++++-
  compiler/basicTypes/SrcLoc.lhs      |    7 ++-
  compiler/hsSyn/Convert.lhs          |   13 +++--
  compiler/hsSyn/HsDecls.lhs          |   30 ++++++-----
  compiler/hsSyn/HsTypes.lhs          |    2 +-
  compiler/hsSyn/HsUtils.lhs          |    2 +-
  compiler/main/HscStats.hs           |    7 ++-
  compiler/parser/Parser.y.pp         |   14 +++--
  compiler/parser/RdrHsSyn.lhs        |   13 +++--
  compiler/rename/RnBinds.lhs         |   17 ++-----
  compiler/rename/RnNames.lhs         |    2 +-
  compiler/rename/RnSource.lhs        |   38 ++++++++------
  compiler/typecheck/TcDeriv.lhs      |    2 +-
  compiler/typecheck/TcInstDcls.lhs   |   96
 ++++++++++++++++++++++++++++-------
  compiler/typecheck/TcTyClsDecls.lhs |   15 +----
  compiler/typecheck/TcTyDecls.lhs    |    6 +-
  16 files changed, 193 insertions(+), 103 deletions(-)
 }}}

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