GHCi with -fwrite-if-simplified-core doubles the memory use after a type check failure
In a big project, I opened ghci
and reloaded a module (very upstream in the dep graph) multiple times, and in the middle, made a type error, then corrected and reloaded a few times more.
Then, if I run ghci
with -fwrite-if-simplified-core
, the memory starts to blow up further after the type error.
For comparison, this is the memory profile without the flag:
and this is one with the flag:
and I manage to find a step-function increase of data originated from downsweep
by info table map profiling.
- GHC version used: GHC 9.6.2
- Operating System: macOS Sonoma 14.0
- System Architecture: Apple M1 Max