Simplifier: Do Cast W/W for INLINE strong loop-breakers
Strong loop-breakers never inline, INLINE pragma or not. Hence they should be treated as if there was no INLINE pragma on them. Also not doing Cast W/W for INLINE strong loop-breakers will trip up Strictness W/W, because it treats them as if there was no INLINE pragma. Subsequently, that will lead to a panic once Strictness W/W will no longer do eta-expansion, as we discovered while implementing !5814. I also renamed to `unfoldingInfo` to `realUnfoldingInfo` and redefined `unfoldingInfo` to zap the unfolding it returns in case of a strong loop-breaker. Now the naming and semantics is symmetrical to `idUnfolding`/`realIdUnfolding`. Now there was no more reason for `hasInlineUnfolding` to operate on `Id`, because the zapping of strong loop-breaker unfoldings moved from `idUnfolding` to `unfoldingInfo`, so I refactored it to take `IdInfo` and call it both from the Simplifier and WorkWrap, making it utterly clear that both checks are equivalent.
Showing
- compiler/GHC/Core/Opt/Pipeline.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify.hs 16 additions, 14 deletionscompiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/WorkWrap.hs 2 additions, 2 deletionscompiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Ppr.hs 3 additions, 3 deletionscompiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs 1 addition, 1 deletioncompiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs 2 additions, 2 deletionscompiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs 1 addition, 1 deletioncompiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Tidy.hs 2 additions, 2 deletionscompiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Unfold.hs 1 addition, 3 deletionscompiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Utils.hs 1 addition, 1 deletioncompiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs 1 addition, 1 deletioncompiler/GHC/CoreToIface.hs
- compiler/GHC/Iface/Tidy.hs 3 additions, 3 deletionscompiler/GHC/Iface/Tidy.hs
- compiler/GHC/Types/Id.hs 12 additions, 19 deletionscompiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Info.hs 21 additions, 5 deletionscompiler/GHC/Types/Id/Info.hs
Please register or sign in to comment