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

GHC ghc-devs at haskell.org
Tue Sep 25 19:33:32 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):

 Unfortunately, the `dump-simpl` output is too large to attach (~3 MiB),
 but almost all of it is indeed one huge `case` for `encodeVectorConst`,
 and it does fit the case-of-case pattern.

 So let me see if I understand this correctly: case-of-case is supposed to
 unwrap constructs of the shape `case (case a of b -> c) of d -> e` into
 `case a of b -> (case c of d -> e)`, and normally, the result would then
 reduce to something simpler than the original case-of-case construct - but
 in this case, it doesn't. Does that mean what we need is a way to tell
 when this is going to happen, and in those cases, skip the transform?

 And something I don't understand yet is how this relates to #15253 (adding
 support for type-level integers).

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


More information about the ghc-tickets mailing list