[GHC] #12207: CgStaticPointers fails with -O

GHC ghc-devs at haskell.org
Wed Jun 22 14:41:34 UTC 2016


#12207: CgStaticPointers fails with -O
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  8.1
  (CodeGen)                          |             Keywords:
      Resolution:                    |  StaticPointers
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  codeGen/should_run/CgStaticPointers
      Blocked By:                    |             Blocking:
 Related Tickets:  #11656            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by facundo.dominguez):

 * cc: simonpj (added)


Comment:

 With `-O` the `FloatOut` pass places the `StaticPtr` applications at the
 top level as expected:
 {{{
 lvl_s4Ke
 lvl_s4Ke =
   StaticPtr
     4472709404834582951## 17755048586376966233## lvl_s4Kc lvl_s4Kd

 ... staticKey lvl_s4Ke ...
 }}}
 However some other core-to-core pass is simplifying `staticKey lvl_s4Ke`
 and replacing it with `Fingerprint 4472709404834582951##
 17755048586376966233##`.

 This is alright but it also removes the `lvl_s4Ke` binding! Which then
 cannot be added to the SPT. Any pointers to the code which removes the
 binding?

 My first attempt would be to make a special case for bindings to
 `StaticPtr` applications so they are not removed.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12207#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list