[GHC] #7542: GHC doesn't optimize (strict) composition with id
GHC
ghc-devs at haskell.org
Mon Feb 10 17:35:48 UTC 2014
#7542: GHC doesn't optimize (strict) composition with id
--------------------------------------------+------------------------------
Reporter: shachaf | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by nomeata):
Ah, interesting. The problem is not `mkIdDot2` (that has Arity 1
allright), the problem is `unIdDot2`, which suddenly as artiy 2!
{{{
T7542.unIdDot2
:: forall a_az8 b_az9. (a_az8 -> T7542.Id b_az9) -> a_az8 -> b_az9
[LclIdX,
Arity=2,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=IF_ARGS [20 0] 50 0}]
T7542.unIdDot2 =
\ (@ a_aKU)
(@ b_aKV)
(f_aze :: a_aKU -> T7542.Id b_aKV)
(eta_B1 :: a_aKU) ->
case f_aze of f_Xzl { __DEFAULT ->
T7542.unId @ b_aKV (f_Xzl eta_B1)
}
}}}
(This is already after `InitialPhase [Gentle]`). One would expect `MkId`
and `unId` to behave the same...
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7542#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list