diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-09-25 17:26:56 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-10-31 17:03:26 -0400 |
commit | 6a606980b40df7e084a7f79ecf2f6eab7a135aeb (patch) | |
tree | 47eb0d00149ec72e4eb49e8780e03222a230e9c0 | |
parent | 8c44138aab38bbcc3c380391a533797950b57968 (diff) | |
download | haskell-wip/T16588.tar.gz |
Describe optimisation of demand analysis of noinlinewip/T16588
As described in #16588.
-rw-r--r-- | compiler/basicTypes/MkId.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index bc7d0f57c9..d9d23b1235 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -1595,6 +1595,14 @@ running the simplifier. when we serialize an expression to the interface format. See Note [Inlining and hs-boot files] in ToIface +Note that noinline as currently implemented can hide some simplifications since +it hides strictness from the demand analyser. Specifically, the demand analyser +will treat 'noinline f x' as lazy in 'x', even if the demand signature of 'f' +specifies that it is strict in its argument. We considered fixing this this by adding a +special case to the demand analyser to address #16588. However, the special +case seemed like a large and expensive hammer to address a rare case and +consequently we rather opted to use a more minimal solution. + Note [The oneShot function] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the context of making left-folds fuse somewhat okish (see ticket #7994 |