[GHC] #4962: Dead code fed to CorePrep because RULEs keep it alive spuriously
GHC
cvs-ghc at haskell.org
Wed Feb 16 13:30:53 CET 2011
#4962: Dead code fed to CorePrep because RULEs keep it alive spuriously
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Runtime performance bug
---------------------------------+------------------------------------------
Comment(by batterseapower):
Roman: yes, sorry - let's say that go is used in the body of the let.
Simon: right. However, I'm not so sure that CoreTidy is actually
preserving rules on local lets right now.. certainly nothing in
tidyLetBndr seems to be using setIdSpecialisation or similar on the
outgoing Id. I noticed this when writing the patch above and was actually
wondering if was intentional...
I'm not sure if your proposed plan will work exactly as described because
at any point after CoreTidy (including in the output of CorePrep) all top
level binders are global ids and hence not reported as free variables.
This causes the occurrence analyser to rewrite e.g.:
{{{
Rec {
f = ... f ... -- Note that f is a globalid!
}
}}}
To:
{{{
f = ... f ... -- Note that the Rec wrapper has vanished
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4962#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list