[GHC] #15069: Missed SpecConstr opportunity

GHC ghc-devs at haskell.org
Fri Apr 20 16:35:46 UTC 2018


#15069: Missed SpecConstr opportunity
-------------------------------------+-------------------------------------
           Reporter:  simonpj        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.2.2
           Keywords:  SpecConstr     |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 If you look at the final Core for `Csg.calc` in `nofib/real/fulsom` you'll
 see missed opportunities for `SpecConstr`.

 It has nested join points which look like this:
 {{{
  join j (x :: Double) = Board (case x of { D# y -> ... })
                               ...
  in ....(j (D# v))....
 }}}
 So the call to $j$ ends up with an explicit `(D# v)` argument, and
 `SpecConstr`
 should catch it.  But alas it does not because this happends nestedly, and
 `SpecConstr` is worried about exponential blowup.

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


More information about the ghc-tickets mailing list