
#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): So here's an interesting candidate: {{{ -- RHS size: {terms: 27, types: 44, coercions: 4, joins: 0/0} encodeConst encodeConst = \ @ t_areG ds_dtLe ds_dtLf -> case ds_dtLe of { TypeRunit co_areI -> case ds_dtLf `cast` Co:2 of { () -> mempty $fMonoidBuilder }; TypeRscalar t_aq5y -> encodeScalarConst t_aq5y ds_dtLf; TypeRpair @ a1_areO @ b_areP co_areQ ta_aq5A tb_aq5B -> case ds_dtLf `cast` Co:2 of { (a_aq5C, b_aq5D) -> <> $fSemigroupBuilder (encodeConst ta_aq5A a_aq5C) (encodeConst tb_aq5B b_aq5D) } } end Rec } }}} Perfectly benign, but after simplification, we get: {{{ -- RHS size: {terms: 81,945, types: 43,626, coercions: 10,191, joins: 0/2,111} encodeConst1_r4XSg encodeConst1_r4XSg ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15488#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler