Note [Drop unfoldings and rules]
We want to drop the unfolding/rules on every Id:
- We are now past interface-file generation, and in the
codegen pipeline, so we really don't need full unfoldings/rules
- The unfolding/rule may be keeping stuff alive that we'd like
to discard. See Note [Dead code in CorePrep]
- Getting rid of unnecessary unfoldings reduces heap usage
- We are changing uniques, so if we didn't discard unfoldings/rules
we'd have to substitute in them
HOWEVER, we want to preserve evaluated-ness;
see Note [Preserve evaluatedness] in GHC.Core.Tidy. References 2
- Preserve evaluatedness GHC.Core.Tidy
- Dead code in CorePrep GHC.CoreToStg.Prep
Referenced by 2
- CorePrep Overview GHC.CoreToStg.Prep
- GHC.CoreToStg.Prep call site