diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-03-09 10:20:42 +0000 |
---|---|---|
committer | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2021-02-08 22:02:52 +0000 |
commit | 208f0d20c63980890f5ae645cfa09be72a2cd775 (patch) | |
tree | 779feae95001670f7c3a9ec175ae1b1f4735faa4 /compiler/cbits | |
parent | d4bcd37f15a59cea22fbaef280cd85cac20872bf (diff) | |
download | haskell-wip/T18789.tar.gz |
Avoid useless w/w splitwip/T18789
This patch is just a tidy-up for the post-strictness-analysis
worker wrapper split. Consider
f x = x
Strictnesss analysis does not lead to a w/w split, so the
obvious thing is to leave it 100% alone. But actually, because
the RHS is small, we ended up adding a StableUnfolding for it.
There is some reason to do this if we choose /not/ do to w/w
on the grounds that the function is small. See
Note [Don't w/w inline small non-loop-breaker things]
But there is no reason if we would not have done w/w anyway.
This patch just moves the conditional to later. Easy.
This does move soem -ddump-simpl printouts around a bit.
I also discovered that the previous code was overwritten an
InlineCompulsory with InlineStable, which is utterly wrong. That in
turn meant that some default methods (marked InlineCompulsory)
were getting their InlineCompulsory squashed. This patch fixes
that bug --- but of course that does mean a bit more inlining!
Metric Decrease:
T9233
T9675
Metric Increase:
T12707
T3064
T4029
T9872b
T9872d
haddock.Cabal
Diffstat (limited to 'compiler/cbits')
0 files changed, 0 insertions, 0 deletions