[GHC] #13536: Program which terminates instantly in GHC 8.0.2 runs for minutes with 8.2.1

GHC ghc-devs at haskell.org
Thu Apr 6 17:17:26 UTC 2017


#13536: Program which terminates instantly in GHC 8.0.2 runs for minutes with 8.2.1
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.1
      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 rwbarton):

 Zooming out a bit:
 {{{
                 let {
                   go1_s5D8 [Occ=LoopBreaker]
                     :: [(GHC.Types.Bool, GHC.Types.Bool)]
                        -> (GHC.Types.Bool, GHC.Types.Bool)
                        -> (GHC.Types.Bool, GHC.Types.Bool)
                   [LclId, Arity=2, Str=<S,1*U><L,1*U(U,U)>, Unf=OtherCon
 []] =
                       sat-only \r [ds_s5Dh eta_s5Di]
                           case ds_s5Dh of {
                             [] -> eta_s5Di;
                             : y_s5Dk [Occ=Once] ys_s5Dl [Occ=Once] ->
                                 let {
                                   sat_s5Dq [Occ=Once, Dmd=<L,1*U(U,U)>]
                                     :: (GHC.Types.Bool, GHC.Types.Bool)
                                   [LclId] =
                                       \s []
                                           let {
                                             sat_s5Dp [Occ=Once] ::
 (GHC.Types.Bool, GHC.Types.Bool)
                                             [LclId] =
                                                 \u []
                                                     case eta_s5Di of {
                                                       (,) a_s5Dn
 [Occ=Once] b_s5Do [Occ=Once] ->
                                                           eta_s5Di;
                                                     };
                                           } in  w_s5CS sat_s5Dp y_s5Dk;
                                 } in  go1_s5D8 ys_s5Dl sat_s5Dq;
                           }; } in
 }}}
 Is it okay for the `sat_s5Dq` thunk to be marked as single-entry? It is
 passed as the second argument of the recursive call to `go1` but after the
 CSE `go1`'s second argument `eta_s5Di` actually appears twice (as the
 scrutinee of the `case`, and then again as the body of the `case`).

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


More information about the ghc-tickets mailing list