Skip to content
  • Sebastian Graf's avatar
    Don't track free variables in STG syntax by default · 47bbc709
    Sebastian Graf authored
    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
    47bbc709