[GHC] #5302: Unused arguments in join points

GHC ghc-devs at haskell.org
Thu Feb 15 07:30:39 UTC 2018


#5302: Unused arguments in join points
-------------------------------------+-------------------------------------
        Reporter:  reinerp           |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  7.0.3
      Resolution:                    |             Keywords:  JoinPoints
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 osa1):

 Just tried with GHC HEAD. Late demand analysis removes unused join point
 argument.

 {{{
 let-no-escape {
   $j_s4wc [Occ=Once*!T[2], Dmd=<C(C(S)),1*C1(C1(U(U,U)))>]
     :: GHC.Prim.Int#
        -> GHC.Types.Int
        -> (# Unboxed.FingerTree
                Unboxed.Size (Unboxed.Node Unboxed.Size c_s44z),
              Unboxed.FingerTree
                Unboxed.Size (Unboxed.Node Unboxed.Size c_s44z) #)
   [LclId[JoinId(2)], Arity=2, Str=<S,U><L,A>, Unf=OtherCon []] = ...
 }}}

 After:

 {{{
 let-no-escape {
   $w$j_s4BK [InlPrag=NOUSERINLINE[0],
              Occ=Once*!T[1],
              Dmd=<C(S),1*C1(U(U,U))>]
     :: GHC.Prim.Int#
        -> (# Unboxed.FingerTree
                Unboxed.Size (Unboxed.Node Unboxed.Size c_s45o),
              Unboxed.FingerTree
                Unboxed.Size (Unboxed.Node Unboxed.Size c_s45o) #)
   [LclId[JoinId(1)], Arity=1, Str=<S,U>, Unf=OtherCon []] = ...
 }}}

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


More information about the ghc-tickets mailing list