projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f62d90
)
Comments only
author
simonpj@microsoft.com
<unknown>
Tue, 4 May 2010 16:36:29 +0000
(16:36 +0000)
committer
simonpj@microsoft.com
<unknown>
Tue, 4 May 2010 16:36:29 +0000
(16:36 +0000)
compiler/stranal/WorkWrap.lhs
patch
|
blob
|
history
diff --git
a/compiler/stranal/WorkWrap.lhs
b/compiler/stranal/WorkWrap.lhs
index
b0759b9
..
7a56c33
100644
(file)
--- a/
compiler/stranal/WorkWrap.lhs
+++ b/
compiler/stranal/WorkWrap.lhs
@@
-226,6
+226,7
@@
tryWW is_rec fn_id rhs
= return [ (fn_id, rhs) ]
| is_thunk && worthSplittingThunk maybe_fn_dmd res_info
= return [ (fn_id, rhs) ]
| is_thunk && worthSplittingThunk maybe_fn_dmd res_info
+ -- See Note [Thunk splitting]
= ASSERT2( isNonRec is_rec, ppr new_fn_id ) -- The thunk must be non-recursive
checkSize new_fn_id rhs $
splitThunk new_fn_id rhs
= ASSERT2( isNonRec is_rec, ppr new_fn_id ) -- The thunk must be non-recursive
checkSize new_fn_id rhs $
splitThunk new_fn_id rhs
@@
-356,8
+357,8
@@
get_one_shots (Note _ e) = get_one_shots e
get_one_shots _ = noOneShotInfo
\end{code}
get_one_shots _ = noOneShotInfo
\end{code}
-Thunk splitting
-~~~~~~~~~~~~~~~
+Note [Thunk splitting]
+~~~~~~~~~~~~~~~~~~~~~~
Suppose x is used strictly (never mind whether it has the CPR
property).
Suppose x is used strictly (never mind whether it has the CPR
property).
@@
-391,6
+392,7
@@
function, so that if x's demand is deeper (say U(U(L,L),L))
then the splitting will go deeper too.
\begin{code}
then the splitting will go deeper too.
\begin{code}
+-- See Note [Thunk splitting]
-- splitThunk converts the *non-recursive* binding
-- x = e
-- into
-- splitThunk converts the *non-recursive* binding
-- x = e
-- into