https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114557
Bug ID: 114557 Summary: ehcleanup cleanup_empty_eh_merge_phis eats a lot of memory Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- For the testcase in PR114480 we end up redirecting a lot of edges into very high in-degree blocks. (gdb) p new_bb->preds.m_vecpfx $3 = {m_alloc = 4095, m_using_auto_storage = 0, m_num = 3911} the way the edge redirection works it will resize the target PHI nodes a lot of time, leaving the old PHIs as garbage until the next GC collection. For the testcase this piles up to 16GB of garbage.