• Ömer Sinan Ağacan's avatar
    Remove unused LiveVars and SRT fields of StgCase · 023fc92f
    Ömer Sinan Ağacan authored
    We also need to update `stgBindHasCafRefs` assertion with this change,
    as we no longer have the pre-computed SRT, LiveVars etc. We rename it to
    `topStgBindHasCafRefs` and implement it like this:
    A non-updatable top-level binding may refer to a CAF by referring to a
    top-level definition with CAFs. A top-level definition may have CAFs if
    it's updatable. At this point (because this is done after TidyPgm)
    top-level Ids (whether imported or defined in this module) are
    GlobalIds, so the top-levelness test is easy. (see also comments in the
    Reviewers: bgamari, simonpj, austin
    Reviewed By: simonpj
    Subscribers: thomie
    Differential Revision: https://phabricator.haskell.org/D1889
    GHC Trac Issues: #11550
HscMain.hs 71.5 KB