[GHC] #10421: exponential blowup in inlining (without INLINE pragmas)

GHC ghc-devs at haskell.org
Fri May 15 22:12:05 UTC 2015


#10421: exponential blowup in inlining (without INLINE pragmas)
-------------------------------------+-------------------------------------
              Reporter:  rwbarton    |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.6.3
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The test case for #10397 also demonstrates an exponential blowup by the
 inliner, without any INLINE pragmas.

 I added another four fields to the `Register` type, and I get these final
 Core program sizes. (The variation in sizes between versions is not really
 important, the point is just that they are very large for all versions.)

 {{{
 ghc-7.6.3:
 *** CorePrep:
 Result size of CorePrep
   = {terms: 1,702,684, types: 1,950,647, coercions: 103}

 ghc-7.8.4:
 *** CorePrep:
 Result size of CorePrep
   = {terms: 1,964,183, types: 1,950,620, coercions: 97}

 ghc-7.10.1:
 *** CorePrep:
 Result size of CorePrep
   = {terms: 1,964,212, types: 1,950,764, coercions: 97}

 ghc-7.11:
 *** CorePrep:
 Result size of CorePrep
   = {terms: 1,964,212, types: 1,950,764, coercions: 97}
 }}}

 Ideally GHC should not produce enormous Core programs on its own like
 this.

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


More information about the ghc-tickets mailing list