[GHC] #10012: Cheap-to-compute values aren't pushed into case branches inducing unnecessary register pressure

GHC ghc-devs at haskell.org
Fri Apr 22 10:19:33 UTC 2016


#10012: Cheap-to-compute values aren't pushed into case branches inducing
unnecessary register pressure
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.4
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 To supplement the attached freestanding example, here is a smaller example
 depending upon `bytestring`,
 {{{#!hs
 module Hi where

 import qualified Data.ByteString.Builder as B
 import Data.Monoid
 import Data.Word

 hello :: Word64 -> Word64 -> B.Builder
 hello a b = B.word64LE (f a) <> B.word64LE (f b)
   where f = (+1)
 }}}

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


More information about the ghc-tickets mailing list