[GHC] #11731: Simplifier: Inlining trivial let can lose sharing

GHC ghc-devs at haskell.org
Tue Mar 22 14:41:14 UTC 2016


#11731: Simplifier: Inlining trivial let can lose sharing
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:
            Type:  bug               |               Status:  new
        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):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 >  Ha, well, that's not very cool. I bet it is easily fixed. Just need to
 annotate the binders of the worker, perhaps.

 I found that the worker/wrapper code of the demand analyizer already does
 this annotation.  In this instance, it’s a constructor specialization
 which does not preserve the annotations. I’ll have a look.... it’s easy to
 do, the new functions strictness signature is already calculated, so I
 simply pull the demand on the individual arguments out of that:
 (changeset:8649ac61698c8600f5db64ff7947828bb4715a5d for now, but this is a
 temporary branch). But still, it shows that it is tricky to try to
 preserve the analysis results through the compiler.

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


More information about the ghc-tickets mailing list