diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2021-06-22 14:02:49 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-27 14:57:39 -0400 |
commit | d7758da490db3cc662dbebdac4397b4b2c38d0f0 (patch) | |
tree | ee8da5279b12a0ca2999789e92dea81b1552df67 /compiler/GHC/Core/Subst.hs | |
parent | 3e71874b32725cb0bd95f6a7effc77190a860b3e (diff) | |
download | haskell-d7758da490db3cc662dbebdac4397b4b2c38d0f0.tar.gz |
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.
Diffstat (limited to 'compiler/GHC/Core/Subst.hs')
-rw-r--r-- | compiler/GHC/Core/Subst.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs index 3d93084fc4..36f3bad0d4 100644 --- a/compiler/GHC/Core/Subst.hs +++ b/compiler/GHC/Core/Subst.hs @@ -626,7 +626,7 @@ substIdInfo subst new_id info `setUnfoldingInfo` substUnfolding subst old_unf) where old_rules = ruleInfo info - old_unf = unfoldingInfo info + old_unf = realUnfoldingInfo info nothing_to_do = isEmptyRuleInfo old_rules && not (hasCoreUnfolding old_unf) ------------------ |