]> git.ipfire.org Git - thirdparty/gcc.git/commit
Merge remove_forwarder_block_with_phi into remove_forwarder_block
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 11 Nov 2025 20:07:11 +0000 (12:07 -0800)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Thu, 13 Nov 2025 20:56:55 +0000 (12:56 -0800)
commit4cc7bb62566460ffdd1caaf0b08085b94af32433
tree4db08ea633514c95b2a71666ee45178cb4f39e8a
parent1d8e2d51e5c5cbdb6ad6f455a050af869103dad4
Merge remove_forwarder_block_with_phi into remove_forwarder_block

This is the last cleanup in this area. Merges the splitting functionality
of remove_forwarder_block_with_phi into remove_forwarder_block.
Now mergephi still has the ability to split the edges when merging the forwarder
block with a phi. But this reduces the non-shared code a lot.

gcc/ChangeLog:

* tree-cfgcleanup.cc (tree_forwarder_block_p): Remove must argument.
(remove_forwarder_block): Add can_split
argument. Handle the splitting case (iff phis in bb).
(cleanup_tree_cfg_bb): Update argument to tree_forwarder_block_p.
(remove_forwarder_block_with_phi): Remove.
(pass_merge_phi::execute): Update argument to tree_forwarder_block_p
and call remove_forwarder_block instead of remove_forwarder_block_with_phi.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-cfgcleanup.cc