Opened 16 months ago

Last modified 15 months ago

#15751 new bug

GHC takes huge amounts of memory and compile time when compiling ZipWith from accelerate

Reported by: tdammers Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.2
Keywords: Cc: tmcdonell
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time performance bug Test Case: Compile `Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith` from `accelerate-1.2.0`
Blocked By: Blocking:
Related Tickets: #15488 Differential Rev(s):
Wiki Page:


In #15488, we found that GHC takes huge amounts of memory by building up excessively large amounts of Core. Looking a the Data.Array.Accelerate.Analysis.Hash module there, the problem seems to be due to excessive (and unproductive) inlining.

However, the Data.Array.Accelerate.Test.NoFib.Prelude.ZipWith module *also* takes a very large amount of time and memory to compile, and while it also builds up huge amounts of Core in unproductive ways, the blowup happens in a different step. has a build log that points at the first round of Specialise as the culprit.

Just like #15488, this problem seems to trace back to GHC 8.0.2 at least, possibly further.

Change History (1)

comment:1 Changed 15 months ago by tmcdonell

Cc: tmcdonell added
Note: See TracTickets for help on using tickets.