https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64928
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 34974 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34974&action=edit Patch to limit coalescing amount The committed patch improves peak memory usage from 7.6GB to 5.8GB for the small testcase. The attached patch reduces memory usage from SSA coalescing further (to ~300MB) by simply doing less coalescing. Unfortunately the generated RTL puts a bigger load on CSE/DF and thus we need 7.6GB again (eventually one can find an optimal --param max-out-of-ssa-coalesce-names, but that's probably highly testcase specific). In theory you can iterate on coalescing piecewise as well, but the overhead for doing this might be too big (basically up to computing live/conflict for each coalesce pair separately, taking into account previous coalesces).