[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 09:05:59 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 nomeata):
In comment:4 simon (or ben?) says “duplicating work”, but it seems that
the question at hand is not about loss of sharing, but rather code size,
right? Floating a let binding into the branches of a case does not
duplicate any work, only code.
A `{-# INLINE_THROUGH #-}` pragma seems to be a bit unspecific. Do we
really want the compiler to inline through everything, no matter how
large? Or should this just shift the heuristics a bit? But what is so
special about this `case` that makes this a worthwhile thing here, and not
in other cases (sic)? Maybe the heuristics can be improved in general?
It seems to be more a general question of whether the user wants more
speed or smaller code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10012#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list