[GHC] #11195: New pattern-match check can be non-performant

GHC ghc-devs at haskell.org
Fri Dec 11 06:42:08 UTC 2015


#11195: New pattern-match check can be non-performant
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  highest        |         Milestone:
          Component:  Compiler       |           Version:  7.11
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In my work in merging Phab:D808 (and originally pointed out by thomie), I
 ran into a peculiar bug: the new pattern-match check took gobs of memory
 (~10GB) to check !OptCoercion in the stage-2 compiler. My analysis got
 only as far as nailing the problem down to `pmTraverse`, which took 80% of
 the time, and got called roughly a gajillion times.

 To reproduce, simply compile !OptCoercion (with `-package ghc`) and you'll
 see your memory usage explode.

 So that you'll be able to build GHC until this is fixed, I've disable the
 pattern-match check in that file.

 There is a good chance that this is caused by an interaction between the
 pattern-match check and the type=kind code. I'm happy to probe further,
 but I'd want George's help.

 NB: This applies only after my patch is merged. Which should be today. For
 some value of today. Hopefully today's value of today.

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


More information about the ghc-tickets mailing list