[project @ 2001-09-10 07:24:09 by simonpj]
authorsimonpj <unknown>
Mon, 10 Sep 2001 07:24:09 +0000 (07:24 +0000)
committersimonpj <unknown>
Mon, 10 Sep 2001 07:24:09 +0000 (07:24 +0000)
commit2aa5738fe61869f239672d8e10e8ecb6fc108b47
tree9dff9d17f96a96a44489f69ffc4f620c5d255396
parent8968073e164d4bc513e54ded0070d49c1ab1c22f
[project @ 2001-09-10 07:24:09 by simonpj]
-----------------------------------
Fix a strictness bug in the simplifier
-----------------------------------

This one has been there a long time, but hasn't bitten till
now.  We should never float a let that is marked "sure to be
evaluated" out of a let.  It shouldn't happen, and there was
a warning to check, but the warning cried 'wolf' too often, so
we have generally ignored it. But the wolf called for supper,
when compiling spectral/expert with profiling on.

The fix is simple too:
* use exprIsValue not exprIsCheap as the test
* move the warning, so it doesn't cry wolf

Documentation with Simplify.simplRhs.

On the way, I'm going to conmmit a change in the same module,
which keeps unfolding info on lambda-bound variables.  This
improves the elimination of cases when the wrapper does the
'seq' -- then the worker gets to know that the arg is evaluated.
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs