Stop retaining old ModGuts throughout subsequent simplifier phases
Each phase of the simplifier typically rewrites the majority of ModGuts, so we want to be able to release the old ModGuts as soon as possible.
name_ppr_ctxt
lives throught the whole optimiser phase and it was
retaining a reference to ModGuts
, so we were failing to release the
old ModGuts
until the end of the phase (potentially doubling peak
memory usage for that particular phase).
This was discovered using eras profiling (#24332 (closed))
Fixes #24328 (closed)