
#15754: Move free variable computation to after STG passes -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9718 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj):
That's probably what Simon alludes to in comment:6 by suggesting a type index to solve this.
Yes. Even without the full glory of TTG we could have something like this: {{{ data GenStgRhs pass = StgRhsClosure CostCentreStack -- CCS to be attached (default is CurrentCCS) StgBinderInfo -- Info about how this binder is used (see below) (XRhsClosure pass) -- non-global free vars; a list, rather than -- a set, because order is important !UpdateFlag -- ReEntrant | Updatable | SingleEntry [StgBndr pass] -- arguments; if empty, then not a function; -- as above, order is important. (GenStgExpr pass) -- body type instance XRhsClosure pass where XRhsCLosure JustBeforeCodeGen = [Id] XRhsClosure _ = () }}} Now `GenStgRhs JustBeforeCodeGen` has free-var info, but `GenStgRhs OtherPass` does not. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15754#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler