https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104955
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- I suspect that this issue is due to building a feasible_graph per saved diagnostic, thus leading to an O(N^2) where as the function gets bigger, each individual diagnostic requires more work. Perhaps fixable by amortizing the work, by sharing one feasible_graph for all diagnostics in the diagnostic_manager.