[GHC] #10527: Panic Simplifier ticks exhausted with type families
GHC
ghc-devs at haskell.org
Sat Jun 27 14:24:57 UTC 2015
#10527: Panic Simplifier ticks exhausted with type families
-------------------------------------+-------------------------------------
Reporter: sopvop | Owner: bgamari
Type: bug | Status: new
Priority: highest | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by bgamari):
Another thing I have noticed is that the good commit considers some
inlining contexts to be `RuleArgCtxts` which the bad commits considers
`BoringCtxt`. This difference may be due to the good commit's eagerness to
inline `$fFoldableIndentity2` and friends.
Consider, for instance, this inlinig which occurs in a `RuleArgCtxt`
(which directly follows an inlining of `fFoldableIdentity2`),
{{{#!hs
Considering inlining: $s$crsubset_s2eb
arg infos [ValueArg, ValueArg, TrivArg]
interesting continuation RuleArgCtxt
some_benefit True
is exp: True
is work-free: True
guidance IF_ARGS [30 60 0] 70 0
discounted size = -105
ANSWER = YES
Inlining done: $s$crsubset
Inlined fn: \ (@ (g :: * -> *))
($dFunctor_a211 [Occ=Once] :: GHC.Base.Functor g)
(eta_B2 [Occ=Once!] :: Bug.Rec '[] -> g (Bug.Rec '[]))
(eta_B1 [Occ=OnceL]
:: Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]) ->
GHC.Base.fmap
@ g
$dFunctor_a211
@ (Bug.Rec '[])
@ (Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int])
(\ _ [Occ=Dead] -> eta_B1)
(eta_B2 Bug.$WRNil)
Cont: ApplyToTy Data.Functor.Identity.Identity
ApplyToVal nodup Data.Functor.Identity.$fFunctorIdentity
ApplyToVal nodup ((\ _ [Occ=Dead] -> rs `cast` ...) `cast`
...)
ApplyToVal nodup eta_B1
CastIt Nth:1
((forall a4.
<Data.Functor.Identity.Identity a4>_R
-> Data.Functor.Identity.NTCo:Identity[0]
<a4>_R)@Bug.Rec
'["id"
Bug.:-> Bug.Expr
GHC.Types.Int,
"id"
Bug.:-> Bug.Expr
GHC.Types.Int,
"event_type"
Bug.:-> Bug.Expr
GHC.Types.Int,
"field1"
Bug.:-> Bug.Expr
GHC.Types.Int])
Stop[RuleArgCtxt] Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr
GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
}}}
Compared to the bad commit, which has not yet inlined
`$fFoldableIdentity2` and does the same inlining in roughly the same
context (up to some casts),
{{{#!hs
Considering inlining: $s$crsubset_s2eb
arg infos [ValueArg, ValueArg, TrivArg]
interesting continuation BoringCtxt
some_benefit True
is exp: True
is work-free: True
guidance IF_ARGS [30 60 0] 70 0
discounted size = -105
ANSWER = YES
Inlining done: $s$crsubset
Inlined fn: \ (@ (g :: * -> *))
($dFunctor_a211 [Occ=Once] :: GHC.Base.Functor g)
(eta_B2 [Occ=Once!] :: Bug.Rec '[] -> g (Bug.Rec '[]))
(eta_B1 [Occ=OnceL]
:: Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]) ->
GHC.Base.fmap
@ g
$dFunctor_a211
@ (Bug.Rec '[])
@ (Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int])
(\ _ [Occ=Dead] -> eta_B1)
(eta_B2 Bug.$WRNil)
Cont: ApplyToTy Data.Functor.Identity.Identity
ApplyToVal nodup Data.Functor.Identity.$fFunctorIdentity
ApplyToVal nodup ((\ _ [Occ=Dead] -> rs) `cast` ...)
ApplyToVal nodup eta_B1
Stop[BoringCtxt] Data.Functor.Identity.Identity
(Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr
GHC.Types.Int,
"field1" Bug.:-> Bug.Expr
GHC.Types.Int])
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10527#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list