[GHC] #5129: "evaluate" optimized away
GHC
cvs-ghc at haskell.org
Mon May 2 10:51:01 CEST 2011
#5129: "evaluate" optimized away
---------------------------------+------------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.3
Keywords: seq, evaluate | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment(by simonpj):
No -- GHC would just split them apart. You'd need a new primitive:
{{{
evaluate# :: o -> State# a -> State# a
}}}
That is, with the same type as `touch#` but it does evaluation, which
`touch#` does not. Otherwise I can't see how to be certain that the eval
will never be dropped; the only way I can see is to combine evaluation and
state-token-transformation in a way that GHC can't disentangle, hence
`evaluate#`.
I don't think this is common enough that the performance impact of an out-
of-line call will be important.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5129#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list