[GHC] #9927: Should simplifier try more iterations?

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- When compiling with the `devel1` build, we get debugging output while building libraries. I see a lot of warnings like this: {{{ WARNING: file compiler/simplCore/SimplCore.hs, line 592 Simplifier bailing out after 4 iterations [5024, 247, 22, 1] Size = {terms: 3,735, types: 3,028, coercions: 216} }}} It looks to me like the simplifier is doing quite a nice job and shouldn't give up so soon. Concretely, I propose: increase the cutoff and see what the effect is on timing of running the entire GHC build, at whatever settings a performance guru thinks appropriate (almost certainly ''not'' `devel1`!). Ideally, the testing would take place on ghcspeed, so that it's a controlled environment and can be compared nicely with historical performance. I have not carried out this proposal myself because I'm not sure if there are other issues at work here (I don't know the simplifier much at all), and I don't know if there is even a way to get ghcspeed to do this for us. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by nomeata): ghcspeed is currently not well prepared for such manual runs. There are two options: * Simply do the commit, push to master, see what happens, and revert if you don’t like it. It’s not like you are breaking things, and until last year, this was the normal way anyways. * Do the usual local comparisons of two working copies in validate settings and using nofib-compare. Attach the result to the ticket and discuss. What would you expect from ghcspeed that you would not get this way? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Try `-fmax-simplifier-iterations=N` to change the cutoff value. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Build System -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): What is the meaning of the bracketed list in the output? When I posted this ticket, I assumed they were the sizes of something... something which is getting remarkably small. Upon further reflection, they appear to be differences of sizes of something, in which case the simplifier really is petering out. But a quick look at the code doesn't answer the question. Does anyone know? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): You mean this {{{ WARNING: file compiler/simplCore/SimplCore.hs, line 600 Simplifier bailing out after 4 iterations [2187, 49, 3, 1] }}} The numbers are the numbers of transformations carried out in each iteration. If you see `[blah, 1,1,1]` it's clue that maybe some transformation isn't making progress and is happening repeatedly, or generally that the cascade of transformations isn't working well. Increasing the iteration count can show this up even more vividly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9927: Should simplifier try more iterations? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => invalid Comment: Ah -- I misunderstood. In this case, I think 4 is the right setting, as it often tails off to (or close to) `1`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9927#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC