[GHC] #8319: Simplifier ticks exhausted (need -fsimpl-tick-factor=955)

#8319: Simplifier ticks exhausted (need -fsimpl-tick-factor=955) -----------------------------------+--------------------------------------- Reporter: ruudkoot | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- Attached file needs a rather high simpl-tick-factor (955) in order to compile. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8319 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8319: Simplifier ticks exhausted (need -fsimpl-tick-factor=955) ---------------------------------------+----------------------------------- Reporter: ruudkoot | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by ruudkoot): $ ghc --make -O2 Test.hs [1 of 1] Compiling Main ( Test.hs, Test.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone $w$j{v s3DM} [lid] To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 183945 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8319#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8319: Simplifier ticks exhausted (need -fsimpl-tick-factor=955) ---------------------------------------+----------------------------------- Reporter: ruudkoot | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by simonpj): I've found out what is going on. (What follows is an aide-memoire for me.) There is a huge function of this form: {{{ f = \x -> let BIG BIG BIG in case ... of p1 -> (# a, b, c, d #) p2 -> (# a, b, c, d #) ... p2 -> (# a, b, c, d #) }}} As things stand, in `CoreUnfold`, unboxed tuples don't count towards the size of the express, but DO count towards the result discount. See `Note [Unboxed tuple size and result discount]`. As a result, functions like `f` can be very big, but have a massive result discount, and hence can be inlined like crazy. This blows up the size of the test program. The obvious solution is to nuke the discount, but I need check performance runs carefully. This comment just records my progress. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8319#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8319: Simplifier ticks exhausted (need -fsimpl-tick-factor=955) -------------------------------------+------------------------------------- Reporter: ruudkoot | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Compile- | Blocked By: time crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thomie): This code compiles with `ghc-7.8.1`, `ghc-7.8.3` and `ghc-7.9.20141115`, using `-O2`. Should a regression test be added? Note that the code imports `QuickCheck`. Without it, the bug is not triggered. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8319#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC