]> git.ipfire.org Git - thirdparty/gcc.git/commit
unswitch: Replace manual ondemand maybe_undef with ssa_name_maybe_undef_p/mark_ssa_ma...
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 26 Sep 2024 05:55:58 +0000 (05:55 +0000)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 27 Sep 2024 07:14:00 +0000 (07:14 +0000)
commit9c04112fdc221b0a337f88572dfef4caaca78349
tree4919caadc52d066420ab9909d8467b06aa9c2b4e
parent1a0b33ebc57ebcc9595b19050f5c36c1f9d39e3e
unswitch: Replace manual ondemand maybe_undef with ssa_name_maybe_undef_p/mark_ssa_maybe_undefs [PR116848]

The ondemand maybe_undef that follows phis was added in r7-6427-g8b670f93ab1136
but then later ssa_name_maybe_undef_p/mark_ssa_maybe_undefs was added in
r13-972-gbe2861fe8c527a. This moves the ondemand one to use
mark_ssa_maybe_undefs/ssa_name_maybe_undef_p instead. Which itself will be
faster since the mark_ssa_maybe_undefs is a walk based on the uses of
undefined names (and only once) rather than a walk based on the def of
ones which are more likely defined (and on demand).

Even though the ondemand maybe_undef had some extra special cases, those won't make
a big difference in most code.

Bootstrapped and tested on x86_64-linux-gnu.

PR tree-optimization/116848

gcc/ChangeLog:

* tree-ssa-loop-unswitch.cc (tree_ssa_unswitch_loops): Call mark_ssa_maybe_undefs.
(is_maybe_undefined): Call ssa_name_maybe_undef_p instead of ondemand undef.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-ssa-loop-unswitch.cc