#15754: Move free variable computation to after STG passes -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: patch 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 #15867 | Differential Rev(s): Phab:D5324 #15901 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by Sebastian Graf <sebastian.graf@…>): In [changeset:"47bbc709cb221e32310c6e28eb2f33acf78488c7/ghc" 47bbc70/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="47bbc709cb221e32310c6e28eb2f33acf78488c7" Don't track free variables in STG syntax by default Summary: Currently, `CoreToStg` annotates `StgRhsClosure`s with their set of non- global free variables. This free variable information is only needed in the final code generation step (i.e. `StgCmm.codeGen`), which leads to transformations such as `StgCse` and `StgUnarise` having to maintain this information. This is tiresome and unnecessary, so this patch introduces a trees-to- grow-like approach that only introduces the free variable set into the syntax tree in the code gen pass, along with a free variable analysis on STG terms to generate that information. Fixes #15754. Reviewers: simonpj, osa1, bgamari, simonmar Reviewed By: osa1 Subscribers: rwbarton, carter GHC Trac Issues: #15754 Differential Revision: https://phabricator.haskell.org/D5324 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15754#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler