[GHC] #13543: Improve demand analysis for join points

GHC ghc-devs at haskell.org
Mon Mar 12 16:35:17 UTC 2018


#13543: Improve demand analysis for join points
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:  fixed             |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by alpmestan):

 OK, I'll include this change in my WIP testsuite expectations changes
 patch and ask Simon about the "new" expected output (see below for the
 program & output).

 {{{#!hs
 {-# LANGUAGE RankNTypes, GADTs #-}

 module Foo where

 g :: (Int, Int) -> Int
 {-# NOINLINE g #-}
 g (p,q) = p+q

 f :: Int -> Int -> Int -> Int
 f x p q
   = g (let j y = (p,q)
            {-# NOINLINE j #-}
           in
           case x of
             2 -> j 3
             _ -> j 4)
 }}}

 {{{
 ==================== Strictness signatures ====================
 Foo.$trModule: m
 Foo.f: <S(S),1*U(1*U)><S(S),1*U(U)><S(S),1*U(U)>m
 Foo.g: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m



 ==================== Strictness signatures ====================
 Foo.$trModule: m
 Foo.f: <S(S),1*U(1*U)><S(S),1*U(U)><S(S),1*U(U)>m
 Foo.g: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m
 }}}

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


More information about the ghc-tickets mailing list