[project @ 2004-04-02 13:34:42 by simonpj]
authorsimonpj <unknown>
Fri, 2 Apr 2004 13:34:46 +0000 (13:34 +0000)
committersimonpj <unknown>
Fri, 2 Apr 2004 13:34:46 +0000 (13:34 +0000)
commit52276d816ccaf9eef0fbd9c74833d6fd95b38cd8
tree934a64b35ffe09dab13650b9263ec099eff482df
parentfb30abb2778cc0f3b07581b32d9cba0104937fa5
[project @ 2004-04-02 13:34:42 by simonpj]
Add a flag -fno-state-hack, which switches off the "state hack".

It's claims that every function over realWorldStatePrimTy is a
one-shot function.  This is pretty true in practice, and makes a big
difference.  For example, consider
a `thenST` \ r -> ...E...
The early full laziness pass, if it doesn't know that r is one-shot
will pull out E (let's say it doesn't mention r) to give
let lvl = E in a `thenST` \ r -> ...lvl...
When `thenST` gets inlined, we end up with
let lvl = E in \s -> case a s of (r, s') -> ...lvl...
and we don't re-inline E.
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/main/CmdLineOpts.lhs
ghc/compiler/simplCore/FloatIn.lhs
ghc/compiler/simplCore/OccurAnal.lhs