]> git.ipfire.org Git - thirdparty/gcc.git/commit
cfgcleanup: forwarder block, ignore bbs which merge with the predecessor
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Wed, 12 Nov 2025 00:47:04 +0000 (16:47 -0800)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Thu, 13 Nov 2025 20:56:52 +0000 (12:56 -0800)
commit40c037adb367f9ab8ead1be2e4142a8447f22d13
tree4d91faa26fc4c7ae824b6b0900a78f725fe327a6
parentc6ecbeddc0402ace9ed87e5d1418b8e3d8085aac
cfgcleanup: forwarder block, ignore bbs which merge with the predecessor

While moving mergephi's forwarder block removal over to cfgcleanup,
I noticed a few regressions due to removal of a forwarder block (correctly)
but the counts were not updated, instead let these blocks be handled by the merge_blocks
cleanup code.

gcc/ChangeLog:

* tree-cfgcleanup.cc (tree_forwarder_block_p): Reject bb which has a single
predecessor which has a single successor.

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