diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-03-11 16:55:38 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-04-07 12:57:21 -0400 |
commit | 83363c8b04837ee871a304cf85207cf79b299fb0 (patch) | |
tree | 714c6533cf3deba12d4204cdf0b2aa38b26933d4 /.gitattributes | |
parent | 54b1882416558936d171d78749400b1c838b11b8 (diff) | |
download | haskell-83363c8b04837ee871a304cf85207cf79b299fb0.tar.gz |
Use prepareBinding in tryCastWorkerWrapper
As #21144 showed, tryCastWorkerWrapper was calling prepareRhs, and
then unconditionally floating the bindings, without the checks of
doFloatFromRhs. That led to floating an unlifted binding into
a Rec group.
This patch refactors prepareBinding to make these checks,
and do them uniformly across all calls. A nice improvement.
Other changes
* Instead of passing around a RecFlag and a TopLevelFlag; and sometimes
a (Maybe SimplCont) for join points, define a new Simplifier-specific
data type BindContext:
data BindContext = BC_Let TopLevelFlag RecFlag
| BC_Join SimplCont
and use it consistently.
* Kill off completeNonRecX by inlining it. It was only called in
one place.
* Add a wrapper simplImpRules for simplRules.
Compile time on T9630 drops by 4.7%; little else changes.
Metric Decrease:
T9630
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions