#917: -O introduces space leak
----------------------------------------+-----------------------------------
Reporter: claus.reinke@… | Owner:
Type: bug | Status: new
Priority: lowest | Milestone: _|_
Component: Compiler | Version: 6.5
Keywords: | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------------+-----------------------------------
Comment(by rl):
The CONLIKE pragma is useful in such cases. We could have a `cheapBuild`
which would be exactly like `build` but would be marked as CONLIKE. Then,
if GHC saw:
{{{
xs = cheapBuild f
foo x = foldr g z xs
}}}
it would apply the `foldr/cheapBuild` rule even though this loses sharing.
We'd then be able to control which functions are cheap enough for sharing
not to matter by using `cheapBuild` instead of `build`. This works
reasonably well in DPH.
That's not to say that your suggestion doesn't make sense. It just seems
rather harder to implement.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/917#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs