Commits on Source (2)
-
Sebastian Graf authored
As we found out in #18870, `andArityType` is not monotone, with potentially severe consequences for termination of fixed-point iteration. That showed in an abundance of "Exciting arity" DEBUG messages that are emitted whenever we do more than one step in fixed-point iteration. The solution necessitates also recording `OneShotInfo` info for `ABot` arity type. Thus we get the following definition for `ArityType`: ``` data ArityType = AT [OneShotInfo] Divergence ``` The majority of changes in this patch are the result of refactoring use sites of `ArityType` to match the new definition. The regression test `T18870` asserts that we indeed don't emit any DEBUG output anymore for a function where we previously would have. Similarly, there's a regression test `T18937` for #18937, which we expect to be broken for now. Fixes #18870.
18940dbf -
Sebastian Graf authored
See Note [Exciting arity] why we emit the warning at all and why we only do after the second iteration now.
ff98c9f1
Showing
- compiler/GHC/Core/Opt/Arity.hs 237 additions, 138 deletionscompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/Simplify.hs 8 additions, 8 deletionscompiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/Simplify/Utils.hs
- testsuite/tests/arityanal/should_compile/T18870.hs 12 additions, 0 deletionstestsuite/tests/arityanal/should_compile/T18870.hs
- testsuite/tests/arityanal/should_compile/T18937.hs 8 additions, 0 deletionstestsuite/tests/arityanal/should_compile/T18937.hs
- testsuite/tests/arityanal/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/arityanal/should_compile/all.T