[GHC] #2273: inlining defeats seq
GHC
trac at galois.com
Fri May 16 05:03:19 EDT 2008
#2273: inlining defeats seq
----------------------+-----------------------------------------------------
Reporter: igloo | Owner: igloo
Type: merge | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Changes (by simonpj):
* owner: => igloo
* type: bug => merge
Comment:
Fixed by
{{{
Fri May 16 09:51:49 GMT Daylight Time 2008 simonpj at microsoft.com
* Improve the treatment of 'seq' (Trac #2273)
Trac #2273 showed a case in which 'seq' didn't cure the space leak
it was supposed to. This patch does two things to help
a) It removes a now-redundant special case in Simplify, which
switched off the case-binder-swap in the early stages. This
isn't necessary any more because FloatOut has improved since
the Simplify code was written. And switching off the binder-swap
is harmful for seq.
However fix (a) is a bit fragile, so I did (b) too:
b) Desugar 'seq' specially. See Note [Desugaring seq (2)] in DsUtils
This isn't very robust either, since it's defeated by abstraction,
but that's not something GHC can fix; the programmer should use
a let! instead.
M ./compiler/basicTypes/MkId.lhs -6 +14
M ./compiler/deSugar/DsUtils.lhs -9 +44
M ./compiler/simplCore/Simplify.lhs -12 +15
}}}
Most of the new lines are comments!
I believe this could usefully be moved to the branch too.
I wonder if it'd be worth a test in `eyeball`?
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2273#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list