• Joachim Breitner's avatar
    DmdAnal: Add a final, safe iteration · 8d92b88d
    Joachim Breitner authored
    this fixes #12368.
    It also refactors dmdFix a bit, removes some redundancies (such as
    passing around an strictness signature right next to an id, when that id
    is guaranteed to have been annotated with that strictness signature).
    Note that when fixed-point iteration does not terminate, we
    conservatively delete their strictness signatures (set them to nopSig).
    But this loses the information on how its strict free variables are
    Lazily used variables already escape via lazy_fvs. We ensure that in the
    case of an aborted fixed-point iteration, also the strict variables are
    put there (with a conservative demand of topDmd).
    Differential Revision: https://phabricator.haskell.org/D2392
Demand.hs 76.4 KB