Remove strict_overflow_p from tree_single_nonzero_warnv_p
The strict_overflow_p flag was removed from tree_single_nonzero_warnv_p and the function was renamed to tree_single_nonzero_p.
The strict_overflow_p flag was removed from the tree_single_nonzero_warnv_p helper function. This helper is part of the larger tree_expr_nonzero_warnv_p function, which aims to eliminate a call to fold_overflow_warning(). As part of the change, the helper was renamed to tree_single_nonzero_p to reflect that it no longer handles overflow warnings directly. This change also impacts c-ubsan.cc, gimple-range-fold.cc, ipa-prop.cc, tree-ssa-phiopt.cc, and value-query.cc.
In Details
This commit removes strict_overflow_p from tree_single_nonzero_warnv_p within fold-const.cc. This function helps determine if a single-operand expression is provably non-zero, and is called by tree_expr_nonzero_warnv_p. The warnv suffix indicated potential emission of overflow warnings, which are now handled differently. The ripple effect touches various optimization passes like IPA and SSA reassoc. Outside the immediate files, the connection to the larger -Wstrict-overflow deprecation effort might not be obvious.
For Context
GCC optimizes code by simplifying constant expressions at compile time. tree_single_nonzero_warnv_p helps determine if a single-operand expression is non-zero. Originally, the warnv suffix implied the function might trigger overflow warnings during this check. This commit removes the strict_overflow_p flag, which controlled this warning behavior, and renames the function to tree_single_nonzero_p. This is a step to deprecate the -Wstrict-overflow flag, which controlled how aggressively the compiler warned about potential integer overflows during constant folding. The changes impact several files, showing the widespread usage of compile-time range analysis.