]> git.ipfire.org Git - thirdparty/gcc.git/commit
forwprop: Move around the marking bb for eh to after the local non-fold_stmt optimiza...
authorAndrew Pinski <quic_apinski@quicinc.com>
Mon, 21 Apr 2025 23:33:04 +0000 (16:33 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 14 May 2025 14:52:01 +0000 (07:52 -0700)
commit398c6ddf1e81ba0cfd14a600ff8ceb4611fc8cf6
tree832ac888f2fb2c573fe365df6d02731c3d3dbbce
parent6d2342f5e855358bc8e9a1320b2fddc97d4b4bac
forwprop: Move around the marking bb for eh to after the local non-fold_stmt optimizations

When moving the optimize_memcpy_to_memset optimization to forwprop from fold_stmt, the marking
of the bb to purge for eh cleanup was not happening for the local optimizations but only after
the fold_stmt, this causes g++.dg/torture/except-2.C to fail.
So this patch moves the marking of the bbs for cleanups after the local forwprop optimizations
instead of before.

There was already code to add to to_purge after forward_propagate_into_comparison and removes
that as it is now redundant.

gcc/ChangeLog:

* tree-ssa-forwprop.cc (pass_forwprop::execute): Move marking of to_purge bb
and marking of fixup statements to after the local optimizations.

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