[GHC] #6070: Fun with the demand analyser
GHC
ghc-devs at haskell.org
Thu Feb 15 07:28:45 UTC 2018
#6070: Fun with the demand analyser
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.4.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 osa1):
Just tried with GHC HEAD, unused arg in join point in `Unboxed.hs`
vanishes with late demand analysis.
{{{
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/6070#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list