https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120729
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:59e5e863c7dc5e8a4164d36273c4c2b5f6cd602c commit r15-9865-g59e5e863c7dc5e8a4164d36273c4c2b5f6cd602c Author: Richard Biener <[email protected]> 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. (cherry picked from commit 97044a47de533f2a9b3fc864e5ea318e53979079)
