[GHC] #14626: No need to enter a scrutinised value

GHC ghc-devs at haskell.org
Thu Jan 11 10:45:00 UTC 2018


#14626: No need to enter a scrutinised value
-------------------------------------+-------------------------------------
        Reporter:  heisenbug         |                Owner:  heisenbug
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  performance
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13861            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Yes, the whole point heisenbug's patch is to return `xs` without entering
 it.  But we we are returning a badly-tagged pointer.  If in the above code
 we return R1, that will be bad.  Really we should un-tag it only if/when
 we enter it.  For example if we had
 {{{
 data MkS = MkS ![Int]
 f (MkT xs) = MkS xs
 }}}
 then when we build `MkS xs` we need a correctly tagged xs, not a de-tagged
 one.

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


More information about the ghc-tickets mailing list