https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120729
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:97044a47de533f2a9b3fc864e5ea318e53979079 commit r16-1622-g97044a47de533f2a9b3fc864e5ea318e53979079 Author: Richard Biener <rguent...@suse.de> Date: Fri Jun 20 15:07:20 2025 +0200 tree-optimization/120729 - limit compile time in uninit_analysis::prune_phi_opnds The testcase in this PR shows, on the GCC 14 branch, that in some degenerate cases we can spend exponential time pruning always initialized paths through a web of PHIs. The following adds --param uninit-max-prune-work, defaulted to 100000, to limit that to effectively O(1). PR tree-optimization/120729 * gimple-predicate-analysis.h (uninit_analysis::prune_phi_opnds): Add argument of work budget remaining. * gimple-predicate-analysis.cc (uninit_analysis::prune_phi_opnds): Likewise. Maintain and honor it throughout the recursion. * params.opt (uninit-max-prune-work): New. * doc/invoke.texi (uninit-max-prune-work): Document.