[GHC] #7258: Compiling DynFlags is jolly slow

GHC ghc-devs at haskell.org
Thu Oct 26 12:31:50 UTC 2017


#7258: Compiling DynFlags is jolly slow
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.6.1
      Resolution:                    |             Keywords:  deriving-perf
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by alexbiehl):

 Tobias, I had a quick glimpse over CmmSink and
 [https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmSink.hs#L409
 `skipped`] looks suspicious:

 For every assignment `l = e` which is not sunk `l` is
 [https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmSink.hs#L409
 consed] to `skipped`.

 And for each assignment `l = e` is checked a) is it element of sink and b)
 is there any register in skipped mentioned in `e`:


 {{{
         cannot_inline = skipped `regsUsedIn` rhs -- Note [dependent
 assignments]
                         || l `elem` skipped
                         || not (okToInline dflags rhs node)
 }}}

 Considering the amount of code generated this might be a thing.

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


More information about the ghc-tickets mailing list