]> git.ipfire.org Git - thirdparty/gcc.git/commit
fwprop: invoke change_is_worthwhile to judge if a replacement is worthwhile
authorHaochen Gui <guihaoc@gcc.gnu.org>
Mon, 24 Jun 2024 05:12:51 +0000 (13:12 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Mon, 24 Jun 2024 05:17:27 +0000 (13:17 +0800)
commitea8061f46a301797e7ba33b52e3b4713fb8e6b48
tree5af1a6d1acda729a73aba45c730b5e04b1df28a7
parentd820db38870155d941ffcad5846389e0de059534
fwprop: invoke change_is_worthwhile to judge if a replacement is worthwhile

gcc/
* fwprop.cc (try_fwprop_subst_pattern): Invoke change_is_worthwhile
to judge if a replacement is worthwhile.  Remove single_set check
and add is_debug_insn check.
* recog.cc (swap_change): Invalidate recog_data when the cached INSN
is swapped out.
* rtl-ssa/changes.cc (rtl_ssa::changes_are_worthwhile): Check if the
insn cost of new rtl is unknown and fail the replacement.
gcc/fwprop.cc
gcc/recog.cc
gcc/rtl-ssa/changes.cc