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

GHC ghc-devs at haskell.org
Thu Mar 31 09:00:36 UTC 2016


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

Comment (by simonpj):

 >  * It would no longer get erased with `-fstrictness -fno-worker-
 wrapper`. Although we might argue that this is not a supported
 configuration.

 I'm very dubious about `-no-worker-wrapper`.  Maybe we should kill it off.

 >  * Since the worker-wrapper pass happens before the next occurrence
 analyzer (does it?), the occurrence analyzer no longer sees the `1*`
 `demandInfo` and thus cannot set the `oneShotInfo`.

 False.  The occurrence analyser uses call-once `C1` info (the `Count`
 argument to `UCall`).  It does not use the demanded-once `1*` info (the
 `Count` field to `Use`).  It is the latter that we are going to erase, NOT
 the former.

 > Why not do it in the occurrence analyser?

 By "it" I guess you mean the erasure?  Because the occurrence analyser
 runs repeatedly; no sense in repeatedly erasing info that is already
 erased.

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


More information about the ghc-tickets mailing list