[GHC] #15488: GHC takes up huge amount of memory when compiling accelerate 1.2.0

GHC ghc-devs at haskell.org
Wed Sep 26 09:08:05 UTC 2018


#15488: GHC takes up huge amount of memory when compiling accelerate 1.2.0
-------------------------------------+-------------------------------------
        Reporter:  noah              |                Owner:  tdammers
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
                                     |  accelerate,memory,compile
Operating System:  Linux             |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  Compile-time      |            Test Case:  accelerate
  performance bug                    |  1.2.0
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 Ah, yes, that makes sense. A lot, actually. The situation fits the
 description like a glove - we have the nested cases, we have small
 expressions at the leaves, and we have the "-O2 triggers exponential
 blowup" part.

 However, the patch proposed in
 https://ghc.haskell.org/trac/ghc/ticket/13253#comment:24 does not make
 things any better - core size still blows up the same (114k terms), and
 compilation time is about the same. In fact, no matter what conditions I
 put in that particular spot, I always get the same result, suggesting that
 this particular program never hits the `OneOcc` branch at all.

 I still think case-of-case is the direction to investigate, but this
 particular patch does not seem to be the solution.

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


More information about the ghc-tickets mailing list