[GHC] #15754: Move free variable computation to after STG passes
GHC
ghc-devs at haskell.org
Thu Nov 8 17:12:34 UTC 2018
#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 #15867 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Another invariant that the code generator needs is (I believe) that every
let-binder has a distinct unique. We can't re-use the same unique, even
in a different scope, let alone shadowing.
Why? Because (I believe) that the code generator uses these uniques to
generate unique top level labels for the entry code and info table for the
closure.
Now, it's probably the case that they are unique anyway; but we should
either
* Write this down as a invariant of STG, or
* Establish this invariant in the immediately-before-codegen pass that
gets the free vars right, or
* Not assume it in the code generator
Sebastian, are you planning to work on this free-var change? Thanks.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15754#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list