[GHC] #13564: Why does memory usage increase so much during CoreTidy?

GHC ghc-devs at haskell.org
Tue Apr 11 12:13:05 UTC 2017


#13564: Why does memory usage increase so much during CoreTidy?
-------------------------------------+-------------------------------------
           Reporter:  rwbarton       |             Owner:  (none)
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.1
           Keywords:                 |  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:
-------------------------------------+-------------------------------------
 I made GHC display the live data size before and after each pass and while
 compiling DynFlags, the live data size increased by almost 50% during the
 CoreTidy pass, even though the Core program size hardly changed:
 {{{
 ...
 Result size of Simplifier
   = {terms: 104,494,
      types: 264,683,
      coercions: 15,760,
      joins: 58/680}
 !!! Simplifier [DynFlags]: 19.69 221248736: finished in 5337.48
 milliseconds, allocated 4416.624 megabytes
 *** Demand analysis [DynFlags]: 19.69 221248152:
 Result size of Demand analysis
   = {terms: 104,494,
      types: 264,683,
      coercions: 15,760,
      joins: 58/680}
 !!! Demand analysis [DynFlags]: 20.77 248604416: finished in 1349.45
 milliseconds, allocated 2298.950 megabytes
 *** CoreTidy [DynFlags]: 20.77 248603432:
 Result size of Tidy Core
   = {terms: 104,440,
      types: 264,565,
      coercions: 15,700,
      joins: 58/679}
 !!! CoreTidy [DynFlags]: 21.43 342594336: finished in 1124.37
 milliseconds, allocated 736.209 megabytes
 }}}
 I find the amount of this increase surprising considering what CoreTidy
 does.

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


More information about the ghc-tickets mailing list