https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117096
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:60de5585812f59a3095fa6208b01ddb8382634a0 commit r15-4334-g60de5585812f59a3095fa6208b01ddb8382634a0 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Sun Oct 13 11:16:51 2024 -0700 dce: add remove_unused_locals conditionally to the todos [PR117096] This is the updated patch with the suggestion from: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665217.html Where we use a second arg/param to set which passes we want to have the remove_unused_locals on the dce. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: PR tree-optimization/117096 * passes.def: Update some of the dce/cd-cde passes setting the 2nd arg to true. Also remove comment about stdarg since dce does it. * tree-ssa-dce.cc (pass_dce): Add remove_unused_locals_p field. Update set_pass_param to allow for 2nd param. Use remove_unused_locals_p in execute to return TODO_remove_unused_locals. (pass_cd_dce): Likewise. * tree-stdarg.cc (pass_data_stdarg): Remove TODO_remove_unused_locals. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>