diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-03-11 16:55:38 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-06 08:13:41 +0000 |
commit | 6977a5e0d9909685c4f1baa5aaec38fbf99960ec (patch) | |
tree | 6d30b2106dfc018a58df63089299b1521cf22c96 /compiler/Language | |
parent | ed62dc66c6fff433349145b4cc41198effedfab8 (diff) | |
download | haskell-wip/T21144.tar.gz |
Use prepareBinding in tryCastWorkerWrapperwip/T21144
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 'compiler/Language')
0 files changed, 0 insertions, 0 deletions