[GHC] #14880: GHC panic: updateRole
GHC
ghc-devs at haskell.org
Tue Jul 31 08:17:02 UTC 2018
#14880: GHC panic: updateRole
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler (Type | Version: 8.2.2
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: #15076 | Differential Rev(s): Phab:D4769
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Just to record that we decided that the experiment in comment:68 is
misleading.
There are two main changes in Richard's patch
1. Do `closeOverKinds` at the end, here:
{{{
-- NEW
tyCoVarsOfType = closeOverKinds . tcvs_of_type
}}}
rather than independently at each leaf:
{{{
-- OLD
tyCoFVsOfType (TyVarTy v) a b c = (unitFV v `unionFV` tyCoFVsOfType
(tyVarKind v)) a b c
-- NEW
tcvs_of_type (TyVarTy v) = unitVarSet v
}}}
2. Insetad of using `FV` and then taking its `VarSet`, use `VarSets`
directly. This jolly well ought to be faster.
But in comment:68, Tobias used the new (1) but the old (2) and thus closed
over the kind vars ''both'' at the
leaves ''and'' at the end. That's not going to be fast.
We agreed that a it'd be iluminating to start from the existing GHC
baseline and try (2) alone: is
`VarSet` faster than `FV`?
Then add (1).
NB: it is (1) that fixes the actual bug in this ticket. Ultimately it is
not optional. But (1) should
be a perf boost too! If a variable occurs N times, we'll take the free
vars of its kind once instead
of N times.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14880#comment:70>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list