Fix loop in the interface representation of some `Unfolding` fields
As discovered in #22272, dehydration of the unfolding info of a recursive definition used to involve a traversal of the definition itself, which in turn involves traversing the unfolding info. Hence, a loop. Instead, we now store enough data in the interface that we can produce the unfolding info without this traversal. See Note [Tying the 'CoreUnfolding' knot] for details. Fixes #22272 Co-authored-by:Simon Peyton Jones <simon.peytonjones@gmail.com>
Showing
- compiler/GHC/Core.hs 54 additions, 28 deletionscompiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Ppr.hs 12 additions, 7 deletionscompiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs 5 additions, 4 deletionscompiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs 1 addition, 1 deletioncompiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Tidy.hs 6 additions, 5 deletionscompiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Unfold.hs 18 additions, 11 deletionscompiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs 35 additions, 24 deletionscompiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/Core/Utils.hs 3 additions, 4 deletionscompiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs 2 additions, 1 deletioncompiler/GHC/CoreToIface.hs
- compiler/GHC/Iface/Rename.hs 2 additions, 2 deletionscompiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs 36 additions, 8 deletionscompiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs 47 additions, 3 deletionscompiler/GHC/IfaceToCore.hs
- testsuite/tests/deSugar/should_compile/T13208.stdout 4 additions, 4 deletionstestsuite/tests/deSugar/should_compile/T13208.stdout
- testsuite/tests/numeric/should_compile/T14170.stdout 18 additions, 12 deletionstestsuite/tests/numeric/should_compile/T14170.stdout
- testsuite/tests/numeric/should_compile/T14465.stdout 31 additions, 22 deletionstestsuite/tests/numeric/should_compile/T14465.stdout
- testsuite/tests/numeric/should_compile/T7116.stdout 23 additions, 18 deletionstestsuite/tests/numeric/should_compile/T7116.stdout
- testsuite/tests/simplCore/should_compile/T22272.hs 7 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T22272.hs
- testsuite/tests/simplCore/should_compile/T22272.stderr 2 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T22272.stderr
Loading
Please register or sign in to comment