[GHC] #12622: Unboxed static pointers lead to missing SPT entries
GHC
ghc-devs at haskell.org
Tue Nov 22 09:55:49 UTC 2016
#12622: Unboxed static pointers lead to missing SPT entries
-------------------------------------+-------------------------------------
Reporter: mboes | Owner:
| facundo.dominguez
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2709
Wiki Page: | Phab:D2720
-------------------------------------+-------------------------------------
Comment (by simonpj):
Interesting. In fact this "make it an exported Id" stuff can now be done
later. The Grand Plan comment in `SimplCore` says
{{{
The FloatOut pass is careful to produce an /exported/ Id for a floated
'StaticPtr', so the binding is not removed by the simplifier (see
#12207).
E.g. the code for `f` above might look like
static_ptr = StaticPtr <fingerprint> k
f x = ...(staticKey static_ptr)...
which might correctly be simplified to
f x = ...<fingerprint>...
BUT the top-level binding for static_ptr must remain, so that it can be
collected to populate the Static Pointer Table.
}}}
But if we generate `sp = makeStatic e)` not `sp = StaticPtr blah blah`,
then `(staticKey sp)` won't simplify, but will still use `sp`. So no need
for special treatment. Hooray.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12622#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list