[GHC] #12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8.

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8. ----------------------------------------+--------------------------------- Reporter: rdwebster | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: MacOS X Architecture: Unknown/Multiple | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+--------------------------------- I encountered the "Simplifier ticks exhausted" error when compiling some code generated by hprotoc in GHC 8.0.1. It works with -O0, but fails with -O1. The code compiles successfully with GHC 7.10, but fails with 8.0.1. Specifying a larger value for 'simpl-tick-factor' doesn't seem to help. The original code was generated by hprotoc, but a much simplified version is attached. Here is the output with '-ddump-simpl-stats' enabled: {{{ stack build cycle-test --ghc-options -ddump-simpl-stats cycle-test-0.1.0.0: configure Configuring cycle-test-0.1.0.0... cycle-test-0.1.0.0: build Preprocessing library cycle-test-0.1.0.0... [1 of 4] Compiling Thing2[boot] ( src/Thing2.hs-boot, .stack- work/dist/x86_64-osx/Cabal-1.24.0.0/build/Thing2.o-boot ) [2 of 4] Compiling Thing1 ( src/Thing1.hs, .stack- work/dist/x86_64-osx/Cabal-1.24.0.0/build/Thing1.o ) [3 of 4] Compiling Thing2 ( src/Thing2.hs, .stack- work/dist/x86_64-osx/Cabal-1.24.0.0/build/Thing2.o ) [4 of 4] Compiling Box ( src/Box.hs, .stack- work/dist/x86_64-osx/Cabal-1.24.0.0/build/Box.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-apple-darwin): Simplifier ticks exhausted When trying UnfoldingDone $fxEqThing2 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 Total ticks: 6442 1681 PreInlineUnconditionally 280 $dEq_a1AB 280 ds_a1AC 280 ds_i28z 280 ds1_i28A 279 ds_i29a 279 ds1_i29b 1 ds_a1As 1 ds_d28r 1 ds_d28s 280 PostInlineUnconditionally 280 ds1_a1AD 1120 UnfoldingDone 280 $fEqMaybe_$c== 280 $fEqThing1_$c== 279 $fxEqThing2 279 $fEqThing2_$c== 1 $c==_a289 1 not 279 RuleFired 279 Class op == 2241 BetaReduction 280 a_a1AA 280 $dEq_a1AB 280 ds_a1AC 280 ds1_a1AD 280 ds_i28z 280 ds1_i28A 279 ds_i29a 279 ds1_i29b 1 ds_a1As 1 ds_d28r 1 ds_d28s 1 CaseOfCase 1 wild_a1At 840 KnownBranch 840 wild_a1At }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12789 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8. ---------------------------------+---------------------------------------- Reporter: rdwebster | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by rdwebster): * Attachment "cycle-test-src.zip" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12789 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8. ---------------------------------+---------------------------------------- Reporter: rdwebster | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by MikolajKonarski): See also https://ghc.haskell.org/trac/ghc/ticket/12776. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12789#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC
8.
---------------------------------+----------------------------------------
Reporter: rdwebster | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: MacOS X | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
---------------------------------+----------------------------------------
Comment (by simonpj):
Thanks. I worked this through, and it turns out to be a dup of #10083.
It was fixed by
{{{
commit 5a8fa2e662fce9ef03f0ec7891d7f81740e630bc
Author: Edward Z. Yang

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC
8.
---------------------------------+----------------------------------------
Reporter: rdwebster | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: MacOS X | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
---------------------------------+----------------------------------------
Comment (by Simon Peyton Jones

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8. ---------------------------------+---------------------------------------- Reporter: rdwebster | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Comment (by rdwebster): Thanks for investigating. I have a workaround for the problem, so I am not blocked by this. I decided to restructure the protobuf messages so that there is no longer this recursive module import situation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12789#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12789: "Simplifier ticks exhausted" compiling mutually recursive modules with GHC 8. ---------------------------------+---------------------------------------- Reporter: rdwebster | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: I'll close this as fixed in that case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12789#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC