Skip to content

WW should also zap useless idInfos in the `certainlyWillInline` case.

Currently inside tryWW we generate a new ID like this:

    new_fn_id = zapIdUsedOnceInfo (zapIdUsageEnvInfo fn_id)
        -- See Note [Zapping DmdEnv after Demand Analyzer] and
        -- See Note [Zapping Used Once info WorkWrap]

Which is always used as the new Id except in the case where the function is guaranteed to be inlined.

Based on the referenced notes I think we should zap the binding even if we don't perform WW.

Edited by Andreas Klebinger
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information