[GHC] #10148: Optimization causes repeated computation

GHC ghc-devs at haskell.org
Mon Mar 9 11:04:02 UTC 2015


#10148: Optimization causes repeated computation
-------------------------------------+-------------------------------------
              Reporter:  akio        |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.1-rc1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  Runtime
  Unknown/Multiple                   |  performance bug
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The attached program, when compiled with `-O0`, calls `array_adjust` 6
 times and hence prints 6 lines of trace output. However, with `-O1`, it
 prints 37 lines of trace output instead. Moreover, this number grows
 quadratically rather than linearly when I increase the value of `n`.

 `-fno-state-hack` did not help.

 I can reproduce the issue with both GHC 7.8.4 and 7.10.0.20150123.

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


More information about the ghc-tickets mailing list