[GHC] #9136: Constant folding in Core could be better

GHC ghc-devs at haskell.org
Fri May 23 08:10:02 UTC 2014


#9136: Constant folding in Core could be better
--------------------------------------------+------------------------------
        Reporter:  simonpj                  |            Owner:
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:
       Component:  Compiler                 |          Version:  7.8.2
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by nomeata):

 That reminded me of something, so I filed #9137. If we had that we could
 specify create RULES like

 {{{
 forall x y z. (isLiteral y, isLiteral z) => (x +# y) -# z = x +# (y -# z)
 forall x y z. (isLiteral y, isLiteral z) => (x -# y) -# z = x -# (y +# z)
 ...
 }}}
 that would rewrite the terms to have the literals next to each other.

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


More information about the ghc-tickets mailing list