diff options
author | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-09-04 13:25:30 -0500 |
---|---|---|
committer | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-09-04 14:22:16 -0500 |
commit | 34728de0f059d8e076981448392203f2501aa120 (patch) | |
tree | 5d77d375ba8bf3a0b8d1cb9f201bbee5cdcf4eb0 /compiler/stranal/WwLib.lhs | |
parent | 6fff2166d4a45b74d37eee2fa2d03b48e5970350 (diff) | |
download | haskell-34728de0f059d8e076981448392203f2501aa120.tar.gz |
documentation and comments for -ffun-to-thunk and -flate-dmd-anal
Diffstat (limited to 'compiler/stranal/WwLib.lhs')
-rw-r--r-- | compiler/stranal/WwLib.lhs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index ca64a7fbce..2ab4bd9ba0 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -214,8 +214,11 @@ the sharing of E. Since absence analysis and worker-wrapper are keen to remove such unused arguments, we add in a void argument to prevent the function from becoming a thunk. -The user can avoid that argument with the -ffun-to-thunk -flag. However, removing all the value argus may introduce space leaks. +The user can avoid adding the void argument with the -ffun-to-thunk +flag. However, this can create sharing, which may be bad in two ways. 1) It can +create a space leak. 2) It can prevent inlining *under a lambda*. If w/w +removes the last argument from a function f, then f now looks like a thunk, and +so f can't be inlined *under a lambda*. Note [All One-Shot Arguments of a Worker] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |