[GHC] #14951: SpecConstr needs two runs when one should suffice

GHC ghc-devs at haskell.org
Fri Mar 23 19:05:05 UTC 2018


#14951: SpecConstr needs two runs when one should suffice
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  (none)
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  SpecConstr
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14844            |  Differential Rev(s):  Phab:D4519
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 Ok, here is some very motivation data:

 If I run !SpecConstr twice, with simplification in between (and without
 the patch in Phab:D4519), then there are significant performance
 improvements:

 {{{
 Nofib allocations
 Benchmark name          previous      change now
 nofib/allocs/event     129683224   +   8.44% 140627312   bytes
 nofib/allocs/fulsom    243329632   -   7.83% 224287920   bytes
 nofib/allocs/mandel2      922640   -  13.89%    794448   bytes
 nofib/allocs/minimax     5371584   -   8.73%   4902576   bytes
 nofib/allocs/parstof     3038584   -   3.63%   2928248   bytes

 Nofib instruction
 Benchmark name              previous    change now
 nofib/instr/compress2     549006516 -   6.36%    514104497
 nofib/instr/fulsom        755145483 -   3.41%    729394470
 nofib/instr/ida           261218740 -   3.98%    250820469
 nofib/instr/k-nucleotide 2140743692 -   3.97%   2055743369
 nofib/instr/minimax         9099200 -   4.38%      8700706
 }}}

 I checked that these are really due to the second !SpecConstr (and not due
 to the extra simplification).

 I did not investigate them individually, and unfortunately, Phab:D4519
 does _not_ achieve any of these improvements. Is there a reasonably simple
 way to make !SpecConstr more idempotent?

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


More information about the ghc-tickets mailing list